Page 1 of 1

ODBC call from BASIC

Posted: Tue May 20, 2008 3:46 pm
by leomauer
Does anybody know how to call ODBC from BASIC routine?
I need to connect and query SQL server from Linux to do some housekeeping tasks in batch.
We are migrating from Windows. On Windows we used OS call to osql wrapped in DS routine.
So far we can't find a similar executable on Linux.
My thought is that if I can invoke ODBC driver from DS routine, then I do not have to change the calls to this routine in many places.
Thanks.

Posted: Tue May 20, 2008 4:11 pm
by ray.wurlod
You will have to change, on the basis that you are not already calling from BASIC. There is a suite of functions collectively called the BASIC SQL Client Interface, or BCI, that mimics the ODBC API. Search the forum for more information. The BCI manual is downloadable from IBM's online UniVerse manuals web site.

Posted: Tue May 20, 2008 4:20 pm
by chulett
Unless this has changed in 8.x you are not licensed to use the ODBC drivers that ship with the product outside of the GUI on a UNIX server. Any such BCI code will work for 30 days and then stop working. You'd need to purchase 3rd party drivers to make this work.

Right? :?

Posted: Tue May 20, 2008 4:48 pm
by ray.wurlod
You might be better off tracking down a UNIX-based variant of osql.