• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JDBC problem

 
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
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • 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
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic