Page 1 of 1

MySql

Posted: Mon Jul 25, 2011 8:00 am
by Jack
I want to connect to a mysql database .
What is the connection string ?
Should i have to install an ODBC drivers ?

Here is a sample with MS sql :
cConnStr := 'Provider='+cPROVIDER+';Data Source='+cFrom+';Initial Catalog='+cDB+';User Id='+cuser+';Password='+cpsw
oCon := TOLEAuto():New('ADODB.Connection')
oCon:ConnectionString := cConnStr
*

Thanks

Re: MySql

Posted: Mon Jul 25, 2011 9:59 am
by anserkk
Jack wrote:What is the connection string ?
Connection String
ConnectionString := "Driver={MySQL ODBC 3.51 Driver};Server=192.168.0.170;Port=3306;Database=databasename;User=username;Password=password;Option=3;"
Jack wrote:Should i have to install an ODBC drivers ?
You can access MySQL Database via ADO and in this method you require ODBC Driver to be installed on all the client PC's

You can also access MySQL via Mr.Daniel's TDolphin class which does not require the ODBC driver to be installed in client PC's

Hope it is clear to you :)

Regards
Anser

Re: MySql

Posted: Sat Jul 30, 2011 10:06 am
by Jack
Does the solution with the ODBC driver work with Win7 32 or 64 bits ?
Thanks

Re: MySql

Posted: Sat Jul 30, 2011 10:57 am
by anserkk
Jack wrote:Does the solution with the ODBC driver work with Win7 32 or 64 bits ?
MySQL ODBC Driver for Windows 32 bit as well as 64 bit is available on the following website
http://dev.mysql.com/downloads/connector/odbc/

Regards
Anser

Re: MySql

Posted: Sat Jul 30, 2011 11:17 am
by Jack
Thanks