aspose file tools*
The moose likes JDBC and the fly likes Driver for Derby database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Driver for Derby database" Watch "Driver for Derby database" New topic
Author

Driver for Derby database

Vish hari
Greenhorn

Joined: Jul 21, 2008
Posts: 20
Hi friens,

I have a java application which connects to derby database.
I have written the following code.

Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection con = DriverManager.getConnection("jdbc:derby:myDB","user","pwd");

While executing I am getting 'Errororg.apache.derby.jdbc.ClientDriver'.
If I try to print the drivers error comes as 'no suitable driver'.

Please revert back to me if you know the solution.

Thanks,
Vishnuvardhan
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Are all the required derby jars on your class path?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Vish hari
Greenhorn

Joined: Jul 21, 2008
Posts: 20
Yes, all the derby jars are in the build path.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2503
    
    8

Originally posted by Vish hari:
Yes, all the derby jars are in the build path.

The build path is not relevant when running Java code, it is when compiling your sources.
The jars should be in your execution path when running the code.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Driver for Derby database