Hello, I'm having problems connecting to the Sybase database that uses jdbc jconn on June 12 in Intel dependence. Jar is also kept.
I'm following stimulation
java.sql.SQLException: No suitable driver found for jdbc: jtds: sybase: some.com: 8000 / dbaq02 java on Sql.DriverManager.getConnection (on java.sql.DriverManager.getConnection on DriverManager.java:604) (DriverManager.java:221) on gbconnect.DBConnectPOC.main (DBConnectPOC.java:81) on sun.reflect.NativeMethodAccessorImpl.invoke0 (original) method) on java.lang.reflect.Method.invoke sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) on SunkreflectkNativeMethodAccessorImplkinvoke (NativeMethodAccessorImplkjava:57) (Methodkjava: 601) Com.intellij.rt.execution.application.AppMain.main (AppMain.java:120)
Please see the following code. Please guide me that I'm really crazy. thank you in advanced.
Try {class.forName ("com.sybase.jdbc3.jdbc.SybDriver"); } Catch (ClassNotFoundException e) {remove New Garkanuniarjment conclusion ( "Driver class'" + DriverClassName + " 'is not valid.', E);}} // jdbc: jtds: sybase http://some.com:8000/ DBAQ02 Description stmt = null; connection conn = tap; try {System.out.println (driverClassName + ": //" + url); Conn = DriverManager.getConnection ( "jdbc: jtds: sybase: some.com: 8000 / DBAQ02 "," bit "," ABC "); Stmt = conn.createStatement (); stmt.executeUpdate (SQL_CREATE); System.out.println (" table created in the database ... ");}
I know that it's too late but has just come to this question. Here are some things: have you tried: 1) jconn4.jar
2) class. ForName ("com.sybase.jdbc4.jdbc.SybDriver");
3) DriverManager.getConnection ("jdbc: sybase: Tds: some.com: 8000? ServiceName = DBAQ02", "sa", "abc");
4) Are you sure the url is: Some com?
5) Instead of using some.com, why do not you enter the actual IP address?
6) Are you sure there are 8000 ports? See it once.
The link source that helps:
No comments:
Post a Comment