• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection problem

 
Mike Ottinger
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on WIN 2k pro and I have a simple Access database that I'm trying to connect to. I set up a data source in control panel, went through the advance function and made an anonymous user and a guest password available. So in my code, when I call
DriverManager.getConnection( url, username, password );
it throws an SQLException on me. I've tried everything I can think of, creating a user dsn and a system dsn (what's the difference?). I tried placing the saved database in the same directory as my source code,no luck. I named the database the same as the dsn. I used for url:
jdbc dbc:user
and I had loaded the driver class with this:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );

does anybody no if I missed something?
 
Mike Ottinger
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind guys, I figured it out. I didn't select the db when I set up the dsn!
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Ottinger:
Nevermind guys, I figured it out. I didn't select the db when I set up the dsn!


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic