![]() You need to register for first time to create an IBM id. If you want to stay with latest db2 server and drivers, download the driver jars from the IBM fix central. click Add External Jars button and add the db2java.zip from the above db2 installation location. In properties window go to Java build Path. In eclipse, right click on the java project-> select Properties. The driver class you are using is from the legacy db2 jdbc driver which is out of support but still available inside db2 server installation e.g (C:\Program Files\IBM\SQLLIB\java\db2java.zip) Your URL is a T2 connectivity url.( "jdbc:db2:sabarish") On running the code I got the following exceptions: : .app.DB2DriverĪt $1.run(Unknown Source)Īt (Native Method)Īt (Unknown Source)Īt (Unknown Source)Īt $AppClassLoader.loadClass(Unknown Source)Īt 0(Native Method)Īt (Unknown Source) ("Class Code: "+rset.getString("clcode")) Pstmt=conn.prepareStatement("Select * from bo") ("DB2 driver is loaded successfully") Ĭonn = DriverManager.getConnection("jdbc:db2:sabarish","db2admin","Murugasaranam") ("Please include Classpath Where your DB2 Driver is located") Please let me know how to add classpath in eclipseĬode snippet: import Ĭlass.forName(".app.DB2Driver") It would be of great help if you could guide me step by step
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |