• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException

 
Krista Meek
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I am trying to connect to an Access database using the jdbc dbc bridge driver. When I run my database application I get the following error in the command line:
------------------------------------------------------------------------
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
------------------------------------------------------------------------

My code is below. Are there any suggestions on what I need to add to, or remove from, the code, or how I should access/name the database in the DriverManager.getConnection("....")? Does anything special need to be done to the database? I defined the fields in the table, and named it appropriately. (It's Access 2000, if that makes a difference.) I realize that there's some debugging left to be done to the code with respects to variables and stuff, but I'd like to at least get a connection.




Thanks!

[ December 09, 2005: Message edited by: Krista Meek ]
[ December 09, 2005: Message edited by: Krista Meek ]
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to go into your Windows control panel and find the place where you configure ODBC. On my Windows XP system it's under Administrative Tools. Set up a user DSN based on Access with the name "Assign5".

However... it doesn't make sense to use an Access database from an applet. Everybody who used your applet would have to download the MDB file and do the same configuration. And you would need to deal with the security issues about how an applet isn't normally allowed to read and write on the local file system. So hopefully that "ChatApplet" isn't actually an applet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic