• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC problem

 
Vlada Den
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I get the following command results, when I try to compile my code:

H:\Programming\DBCon.java:36: cannot access com.microsoft.jdbc.base.BaseDriver
file com\microsoft\jdbc\base\BaseDriver.class not found
final Driver driver = new com.microsoft.jdbc.sqlserver.SQLServerDriver();
^
1 error

Could you, please, help me...

Thanks,

Vlada
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vlada,
Is the driver in your classpath when compiling?

Also, it is good to use DriverManager rather than instantiating the driver class directly. There are some examples in the JDBC tutorial.
 
Vlada Den
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Jeanne.

The tutorial is really very good,

Vlada
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic