sql strings a better way?
Posted: Mon Oct 15, 2012 6:57 am
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)
oDB:=connect2db()
parm1='92523257'
qstring:='select * from partbase where partno = "' + parm1 + '"'
msgbox(qstring)
aTable := sql( oDB, qstring)
cRecord := ''
for i := 1 to 1 // len( aTable )
cRecord:=alltrim('www.ccspecialorders.com/pictures/'+aTable[i,8])
showpicture(cRecord)
order_parts.info_text.Value := str(aTable[1])
next i
oDB:Destroy()
return nil
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)
oDB:=connect2db()
parm1='92523257'
qstring:='select * from partbase where partno = "' + parm1 + '"'
msgbox(qstring)
aTable := sql( oDB, qstring)
cRecord := ''
for i := 1 to 1 // len( aTable )
cRecord:=alltrim('www.ccspecialorders.com/pictures/'+aTable[i,8])
showpicture(cRecord)
order_parts.info_text.Value := str(aTable[1])
next i
oDB:Destroy()
return nil