[Gambas-devel] Gambas & ODBC

Benoit Minisini gambas at ...1...
Wed Dec 29 11:26:43 CET 2004


On Monday 20 December 2004 16:30, Andrea Bortolan wrote:
> Hi all,
> in the attached file you'll find the ODBC connector
> for Gambas, it is based on the unixODBC framework.
> It's still in Alpha version...
> I was able to use it in order to connec to to my
> iSeries (AS/400) database using the Client Access ODBC
> Driver and also I connected succesfully to an MySQL DB
> server.
> I used the Gambas Database example, in the type field
> put the "odbc" value, in the host field put the DSN
> (created using the ODBCConfig), the Database field is
> not used the user and password fields have to be
> filled with a correct data for the connection.
> If you have an iSeries you can try to query the test
> table QIWS.QCUSTCDT that returns 12 record and 11
> field.
>
> Please contact me for any question.
> Have a nice day, Andrea.
>
>

I looked at your driver. Good, but I saw one horrible thing :-) You execute 
the request twice to know the number of records! Never do that. Imagine that 
the query returns 1 000 000 records.

But, the problem with ODBC is always there: how to implement all the functions 
that return the structure of the database ? I know there are some special 
queries in ODBC for that, named "catalog functions".

If you want to finish the implementation of the ODBC driver, here is the only 
information I have about catalog functions. I found them on the ODBTP site: 
http://odbtp.sourceforge.net.

Go to the example page and search for the 'sqltables.php' example.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list