jackson_1
14 years agoFrequent Contributor
Connect to MYSQL Error in 64 bit Machine
hi all,
using TC 9.0 for mysql 4.1.12 database connection, i installed the mysql connector. 5.1driver.
my code:
==========================================================================
db_host: = 'xx.xx.xx.xxx';
db_port: = 3306;
db_name: = 'xxx';
db_user: = 'xxx';
db_pass: = 'xxxx';
dbh: = ADO.CreateADOConnection;
dbh.ConnectionString: = 'Driver={MySQL ODBC 5.1 Driver};Server=' + db_host
+ ';Port=' + db_port
+ ';Database=' + db_name
+ ';UID=' + db_user
+ ';Pwd=' + db_pass
+ ';Option=3;';
dbh.LoginPrompt: = False;
dbh.open;
========================================================================
this code it works well in 32 bit os machine (installed mysql-connector-odbc-5.1.11-win32.msi connector), but i get this error
'unexpected error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'
when i run it in 64 bit os machine(installed mysql-connector-odbc-5.1.11-win64.msi conector);
i created and successfully tested a system dsn using the same db, user, pswd, etc used in the
connection string in 64 bit os machine.
many thanks if anybody can offer helps for this.
using TC 9.0 for mysql 4.1.12 database connection, i installed the mysql connector. 5.1driver.
my code:
==========================================================================
db_host: = 'xx.xx.xx.xxx';
db_port: = 3306;
db_name: = 'xxx';
db_user: = 'xxx';
db_pass: = 'xxxx';
dbh: = ADO.CreateADOConnection;
dbh.ConnectionString: = 'Driver={MySQL ODBC 5.1 Driver};Server=' + db_host
+ ';Port=' + db_port
+ ';Database=' + db_name
+ ';UID=' + db_user
+ ';Pwd=' + db_pass
+ ';Option=3;';
dbh.LoginPrompt: = False;
dbh.open;
========================================================================
this code it works well in 32 bit os machine (installed mysql-connector-odbc-5.1.11-win32.msi connector), but i get this error
'unexpected error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'
when i run it in 64 bit os machine(installed mysql-connector-odbc-5.1.11-win64.msi conector);
i created and successfully tested a system dsn using the same db, user, pswd, etc used in the
connection string in 64 bit os machine.
many thanks if anybody can offer helps for this.