Database query error
Posted: Tue Jan 27, 2015 1:21 pm
I'm following this guide: "Scripting Database Access in LiveCode Stacks" on the livecode.byu website.
Trying to connect to an ODBC source (Microsoft SQL).
I have successfully connected and confirmed the connID is a number:
But when I try to do a query I get "invalid connection ID":
I have set up the ODBC source in Windows and the test is successful when I try connect to it there.
Trying to connect to an ODBC source (Microsoft SQL).
I have successfully connected and confirmed the connID is a number:
Code: Select all
put revOpenDatabase("ODBC","ETMDataHub","ETMDataHub","x","x") into connID
if connID is null then
answer "Not connected"
else
answer "Connected"
end if
Code: Select all
put "select * from tbl_Import_ZA_CPI" into tQuery
put revDataFromQuery(tab,return,connID,tQuery) into tData
put tData into field 'Result'