Dear all,
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...)? I saw the property ConnectorType (string), how can I set it? Is TSQLConnector already usable?
Thanks,
Andrea
Mailing lists / lazarus / 2008-12
SQLConnector
4 messages · 3 people · –
- AAndrea Mauri 2
- JJoost van der Sluis 1
- MMichael Van Canneyt 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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.
Joost van der Sluis wrote 13 lines
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.
Just one, actually: the object counts are 'wrong' as you pointed out once... I still didn't find a workable solution for that.
Michael.
Op maandag 01-12-2008 om 16:48 uur [tijdzone +0100], schreef Andrea Mauri: That's the…
Joost van der Sluis ha scritto:
Show quoted text 30 lines
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..
Thanks a lot. I will try it.
Andrea
Show quoted text 8 lines
Joost.
_______________________________________________
Lazarus mailing list
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Dr. Andrea Mauri, PhD
Milano Chemometrics and QSAR Research Group
Department of Environmental Sciences
University of Milano-Bicocca
P.zza della Scienza, 1
20126 Milano - Italy
Tel: ++39 02 64482801
mailto:
http://michem.disat.unimib.it/chm/
