first i m not able to create datasource using the sql server in System Dsn.
so i have install connecter mysql-connector-java-5.1.15.
And i have create datasource by using option" Mysql odbc 3.51 Driver" in sys dsn.
So it will create successfully.
Initialy I could do practice using these only.
But now i m getting exception "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length"
My System configuration is :
Windows7, win 64
MySQL Server 5.1
Connector ODBC 3.51
java >> jdk1.6.0_35, jre6
Please help , i m stuck here from last tow days.
Thans in advance.
In any case, it is a bad idea to use ODBC driver when a thin JDBC driver exists, and there certainly is a thin driver for MySQL. Google mysql thin driver for some links (I don't use MySQL and cannot recommend a concrete driver). Avoid ODBC drivers whenever possible, you'll be saved from the hassle of configuring DSN too.
Martin Vajsar wrote:MySQL is not Microsoft's database, but I believe MS provides ODBC driver for it.
If you mean "MySQL" when you say "MS" then you're right. Because it's Oracle (the owner of MySQL) that provides the ODBC driver.
But I agree that the MySQL JDBC driver should be used instead of going through ODBC.
Rob Spoor wrote:If you mean "MySQL" when you say "MS" then you're right. Because it's Oracle (the owner of MySQL) that provides the ODBC driver.
Didn't know that.
I know MS provides lots of ODBC drivers (or provided on Windows XP, fortunately I got rid of all ODBC-ish connections some time ago and don't really know the situation in Windows 7). I had thought MySQL driver is perhaps included in the bunch.
I remember there were two ODBC drivers for Oracle - one from Microsoft, installed with Windows, and another from Oracle, installed with the Oracle client software. They "featured" different bugs, so it was possible to workaround certain issues by switching to the other one.