[Lazarus] SQLConnector

Joost van der Sluis joost at cnoc.nl
Mon Dec 1 20:51:44 CET 2008


Op maandag 01-12-2008 om 16:48 uur [tijdzone +0100], schreef Andrea
Mauri:
> where I can find information about how to use the SQLConnector 
> component? Is it a general object that can be used to connect to 
> different database types (SQLlite, Firebird, MySQL...)?

That's the idea.

> I saw the property ConnectorType (string), how can I set it? Is 
> TSQLConnector already usable?

You could try, but if I'm correct there are some fundamental flaws in
it's design.

If you need a generic way to connect to several types of databases, just
use simple code like this:

var AConn : TSQLConnection;

begin
  case DBType of
    typeFirebird : Aconn := TSQLIBConnection.Create;
    typeMysql40  : AConn := TMysql40Conn.Create;
etc..

Joost.




More information about the Lazarus mailing list