ODBC access

Harry pub at humantech.biz
Sun Mar 23 04:10:37 EDT 2008

I would like to use ODBC but cannot figure out how connect to the database
or how to extract records. This is the code I'm attempting;

put revOpenDatabase("ODBC","",testdb,"","") into myDB
revQueryDatabase(myDB,"SELECT * FROM Item","tItemList")
put tItemList into field "Item List"

I get "can't find handler" error on revQueryDatabase.  Do I need to initialize
tItemList as an array? I could not find any documentation on how to declare 

In desperation I tried using The Database Query Builder but get this error;

Error Resulted for the SQL command in the database: testdb Revdb
error:[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM Clause.

Since I haven't entered a FROM clause the error seems nonsensical.  Attempting
to look at the available tables gives this error;

"revdberr,[Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read;
no read permission on 'MSysObjects'."

I tried with and without a password set on testDB and the error is the same.

Maybe these errors are unrelated to my original three lines of code above. Is
there any easy to follow documentation and examples of ODBC usage in Revolution? 

More information about the Use-livecode mailing list