Hi Bram

I havent succeeded in getting ODBC for MySQL working. But other native SQLDB compos are working for MySql 4.1.1.

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.

So, which is better - odbc compo or native compo?

regards

Nataraj


Bram Kuijvenhoven wrote:

Nataraj S Narayan wrote:

 Plz suggest me which is the best package to connect to  Mysql 4.1.11
server?


If the MySQL components don't work for you, you can try the TODBCConnection component.

Please note that you need the TODBCConnection.Params property to set connection parameters like

'SERVER=myhost.com'
'PORT=3306'
'DATABASE=mydb'

(it is a TStrings; each string should be of the form 'parameter=value', without the quotes of course)

You also need to set the
- TODBCConnection.Driver to 'MySQL' (Windows: 'MySQL ODBC 3.51 Driver')
- TODBCConnection.Username to your username
- TODBCConnection.Password to your password
See the notes in the class definition in the source of the component for more details; also keep in mind that some properties of TODBConnection are not used, like Hostname. Also the property TODBCConnection.Database has a different meaning! You need the Params property to set these ODBC driver dependent properties.

Note that alternatively, you can create a datasource in the ODBC Driver manager, save it to a file and refer to it using the FileDSN property. To connect to MySQL using ODBC you need to install the following (Debian) packages:

 unixodbc
 unixodbc-dev
 unixodbc-bin (optional GUI tools)
 libmyodbc

Regards,

Bram

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



begin:vcard
fn:http://www.gsis.ac.in
n:S Narayan;Nataraj
org:Good Shepherd International School;Software
adr:Niligiris, ;;M.Palada;Ootacamund;TN;643004;INDIA
email;internet:[EMAIL PROTECTED]
title:Project Coordinator
tel;work:0423 2550371 - 307
x-mozilla-html:TRUE
url:http://www.gsis.ac.in
version:2.1
end:vcard

Reply via email to