Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-06

ODBC support for FPC.

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hello,

There is now ODBC support in FPC. It comes in 2 flavours:

1. A plain ODBC interface unit. (ported from the modbc package for Delphi)

2. I've added a fpodbc unit to the FCL: a thin OOP wrapper around the ODBC API. It makes running queries and retrieving data from a ODBC datasource

   very easy;

I successfully retrieved data from MySQL, MS-Access and Interbase with this.

Inserting/deleting/updating is also possible, but I haven't implemented support for parametrized queries, which means each query must be constructed from scratch. Nevertheless, it works MUCH easier than the plain ODBC calls. (just check the examples, there are 11 of them)

All this should work on Windows and Linux. The plain odbc testprogram worked on both, with the only change required 2 constants denoting the username and password for the database.

Enjoy it.

Michael.

Reply by email