cancel
Showing results for 
Search instead for 
Did you mean: 

Default driver on Windows while connecting to Sybase IQ using iAnywhere JDBC driver

Former Member
0 Kudos
5,303

Hi I am trying to execute LOAD TABLE using client file on Sybase IQ. I am using ianywhere JDBC driver and I am getting the following exception.

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    at ianywhere.ml.jdbcodbc.jdbc3.IDriver.makeODBCConnection(Native Method)
    at ianywhere.ml.jdbcodbc.jdbc3.IDriver.connect(IDriver.java:633)

I am using the following code. Please help. Thanks a lot.

Class.forName("ianywhere.ml.jdbcodbc.jdbc3.IDriver").newInstance();
String url = "jdbc:ianywhere:some.com:2740";
String userName = "sa";
String password = "pass";
dbConn = DriverManager.getConnection(url, userName, password);

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Your URL is incorrect. The above URL format looks more like a jConnect URL than an iAnywhere JDBC URL.

Can you please provide some more details so that we can help you better. In particular, can you tell us:

  1. What version of IQ are you using?
  2. The iAnywhere JDBC Driver is deprecated, do you instead have the SQL Anywhere JDBC Driver installed on your machine (look for either sajdbc.jar or sajdbc4.jar in the directory where you installed IQ.)
  3. If you do not have the SQL Anywhere JDBC Driver on your machine, then check to see if you have the JDBC 4 version of the iAnywhere JDBC Driver (i.e. look for jodbc4.jar in the directory where you installed IQ.)
  4. What version of the JRE are you using?

Note, that question 2 above may cause you confusion given that you are using IQ instead of SQL Anywhere, but in reality, the SQL Anywhere JDBC Driver works quite well with IQ and is a better alternative to the iAnywhere JDBC Driver. If you can provide the above information, then we can help you construct a proper DSN-less URL.

Former Member
0 Kudos

Hi @Karim thanks a lot for reply. IQ version is 15.1 but that is not installed on my machine. I am trying to execute LOAD TABLE USING CLIENT FILE on different database server. Do I need to install IQ or SQL Anywhere in my machine? I dont have sajdbc4.jar but let me try to find out. I am using Java 7.

Former Member
0 Kudos

I tried to add jodbc4.jar in my build path but it gives new error saying java.sql.SQLException: The jodbc.jar build does not match the shared object build at ianywhere.ml.jdbcodbc.jdbc4.IDriver.makeODBCConnection(Native Method) at ianywhere.ml.jdbcodbc.jdbc4.IDriver.connect(IDriver.java:771)

Former Member
0 Kudos

For Sybase IQ 15.1, you will have to stick to jodbc.jar and the iAnywhere JDBC Driver.

I believe the Sybase IQ ODBC Driver for 15.1 is named "Sybase IQ". You should be able to bring up the ODBC Driver Manager and review the list of drivers to make sure you get the correct driver name. Once you have that, you should be able to use a URL similar to the following:

"jdbc:ianywhere:driver=Sybase IQ;links=tcpip(host=YourHost;port=2740);eng=YourSybaseIQEngineName"