issue with code on db query?
Posted: Mon Apr 13, 2015 1:58 pm
Hi everyone,
I'm trying to query a database filtering for a specific name. I keep receiving the following error message, but am unsure as to how to correct it:
button "check it out!": compilation error at line 9 (Commands: missing ',') near "into", char 55
Any advice would be greatly appreciated. I've included the code below:
Thanks in advance for any help!
-Sean
I'm trying to query a database filtering for a specific name. I keep receiving the following error message, but am unsure as to how to correct it:
button "check it out!": compilation error at line 9 (Commands: missing ',') near "into", char 55
Any advice would be greatly appreciated. I've included the code below:
Code: Select all
on mouseUp
global gConnectionID
if gConnectionID is not a number then
answer error "Please connect to the database first."
exit to top
end if
put "status" into tTableName
put "select * from status where name='& field "who"'" into tSQL
-- query the database
put revDataFromQuery(tab, cr, gConnectionID, tSQL) into tData
if item 1 of tData = "revdberr" then
answer error "There was a problem querying the database:" & cr & tData
else
put tData into field "Data"
answer "congrats"
end if
end mouseUp-Sean