Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC help  RSS feed

 
Jack Bolton
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i am using SQL Server 2000 Personal Edition.
and i'm accesing "the Northwind" database like this:
this is some part of the code:


but it always prints the error in the console. So the program it's not accesing the database.
What do i have to correct here?
[ July 02, 2006: Message edited by: Jack Bolton ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's some code that I'm pretty sure works. The Class.forName() technique should be just as good (or better) than the registerDriver() technique.

This looks pretty similar to your own. Can you show us the full stack trace?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum.
[ July 03, 2006: Message edited by: marc weber ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!