Re: [Lazarus] SQLConnector

2008-12-02 Thread Andrea Mauri
Joost van der Sluis ha scritto:
> 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

> Joost.
>
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> 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:[EMAIL PROTECTED]
http://michem.disat.unimib.it/chm/ 

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SQLConnector

2008-12-01 Thread Michael Van Canneyt


On Mon, 1 Dec 2008, Joost van der Sluis wrote:

> 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.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SQLConnector

2008-12-01 Thread Joost van der Sluis
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.

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] SQLConnector

2008-12-01 Thread Andrea Mauri
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
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus