sql strings a better way?

Moderator: Rathinagiri

Post Reply
User avatar
Posts: 45
Joined: Sat Sep 08, 2012 7:18 am
Location: Minnesota U.S.A.

sql strings a better way?

Post by metron9 »

Is making the string qstring in this function to call the sql function the only way to do this or is there a better way?

oh, and is there a timeout on an open mysql data table, do I want to open it and close it with destroy any time I access the table?

function searchmysql(parm1)
qstring:='select * from partbase where partno = "' + parm1 + '"'


aTable := sql( oDB, qstring)
cRecord := ''
for i := 1 to 1 // len( aTable )
order_parts.info_text.Value := str(aTable[1])
next i
return nil

User avatar
Posts: 5411
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 252 times
Been thanked: 305 times

Post by Rathinagiri »

I think once connected, the connection will be retained for further queries. So, you need not connect and close every time you access.

I checked this with my own website hosted. However, I don't know about open mysql table.

Regarding the sql string, I have a function c2sql() for parsing. It is just like your application only.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply