ODBC access

Sarah Reichelt sarah.reichelt at gmail.com
Sun Mar 23 06:00:58 EDT 2008


On Sun, Mar 23, 2008 at 6:10 PM, Harry <pub at humantech.biz> wrote:
> 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"

Hi Harry,

I have bever used ODBC so I can't comment on your database open script
or the permission problems.

However, the 2nd line above is incorrect. Try this:
   put revQueryDatabase(myDB,"SELECT * FROM Item") into tItemList

As revQueryDatabase is a function, you must tell it where to put the
result. Otherwise, Rev thinks it is a handler, which gives you the
"can't find handler" error.

Cheers,
Sarah



More information about the Use-livecode mailing list