on 2013 Jul 01 3:22 AM
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);
Request clarification before answering.
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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)
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"
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.