• Post Reply Bookmark Topic Watch Topic
  • New Topic

Driver String for SQL Server  RSS feed

 
malcolm bailey
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
Does anyone know a driver string for use in java to connect to SQL Server? At the moment I'm using:
DriverManager.registerDriver(new sun.jdbc.Jdbc.OdbcDriver());
but I get the error message:
identifier sun.jdbc.Jdbc.OdbcDriver() Driver not found...
 
malcolm bailey
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Me again...
It was just a daft mistake, in case I confused anyone. It works with:
sun.jdbc.odbc.JdbcOdbcDriver()
oops...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!