Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

An exception with Connection  RSS feed

 
Alejandro Barrero
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code in Widows is:

In the ODBC screen I can connect to the data base, but in Java I am getting the exception "java.sql.SQLException: No suitable driver found for sluggo".
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your jdbc url seems incorrect - it should be of the format - jdbc:db2://<host>[:<port>]/<database_name> Also, please ensure that the DB2 driver jar files are in the classpath.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!