Has anybody successfully connected to PostgreSQL using ODBC?
Zlatko
----- Original Message -----
From: "Bram Kuijvenhoven" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[email protected]>
Sent: Tuesday, July 25, 2006 1:20 PM
Subject: Re: [lazarus] Sqldb ,MySql and Transactions
Nataraj S Narayan wrote:
I havent succeeded in getting ODBC for MySQL working. But other native
SQLDB compos are working for MySql 4.1.1.
The following (from your other mail)
object MySQL41Connection1: TMySQL41Connection
DatabaseName = 'weberp'
Password = 'rambo1'
UserName = 'ODBC'
HostName = '192.168.1.77'
...
end
should be translated to (for Windows)
object ODBCConnection1: TODBCConnection
Driver = 'MySQL ODBC 3.51 Driver'
Username = 'ODBC'
Password = 'rambo1'
// I don't know how this is put in a lfm file, but I'm sure you
understand what I mean by the below
Params = object TStringList Items = 'SERVER=192.168.1.77',
'DATABASE=weberp'
end
end
Joost has said that MySql 4.x.x dont support transactions.
Will transactions work with ODBC? I have used Database1.StartTransaction
and commit and Roll back with Delphi4 + MyODBC 3.51.
The ODBC component does not support transactions (at the moment). Of
course ODBC supports transactions, but I haven't implemented it yet,
partially because it not entirely trivial.
I need to use connection handles because there exist no transaction
handles in ODBC; i.e. there is always one transaction per connection.
Luckily there is a connection cache in ODBC, but I'd need to dive into
that a little bit to make sure transactions won't slow every down too much
(because of an entire reconnects instead of connection cache reuses).
So, which is better - odbc compo or native compo?
I don't know the native component very well, so I can't tell you much
about that. If you need transactions, neither will suffice actually,
according to the above information. Of course you are welcome to create a
patch implementing transaction support in either component!
One advantage of ODBC over native mysql components is that the 4.x mysql
client library (or higher) is GPLed, whereas the ODBC components are not.
This is particularly important if you are writing an application that is
not open source, e.g. a commercial application.
For precise details see http://www.mysql.com/company/legal/licensing/ and
in particular
http://www.mysql.com/company/legal/licensing/foss-exception.html (this
page contains an important exception to the GPL; it has a list of
licenses; if I understand it correctly, applications where each part is
licensed under one of those (open source!) licenses are allowed to use the
MySQL client lib).
Regards,
Bram
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives