wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes JDBC getConnection question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC getConnection question" Watch "JDBC getConnection question" New topic

JDBC getConnection question

Duane Riech
Ranch Hand

Joined: Feb 27, 2003
Posts: 52
I'm new to JDBC and I do need help...
I'm on a Win 2000 platform trying to access a MS Access database called
Manual. I've went into the ODBC DataSource Administrator and created a ODBC
MS Access setup for the database, now I'm trying to get a connection to the
database via a JAVA application ( As shown below ).
I'm getting an exception and I don't know why. I've already searched back
questions in this forum but didn't find a solution.
Thanks for any help.

(Marilyn added code tags and disabled smilies)
[ July 31, 2003: Message edited by: Marilyn de Queiroz ]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Originally posted by Duane Riech:
I'm getting an exception and I don't know why.

and you don't feel like sharing?
Can you drop the exception trace and the output from your code so we can have a look too?
Chris Brat
Ranch Hand

Joined: May 22, 2003
Posts: 108
Hi There,
try making these changes to your code (old code shown with > infront then followed by the change)
> Class.forName("jdbc dbc:JdbcOdbcDriver").newInstance();

Do you make use of a user name and passward? If you dont then try
> Connection con = DriverManager.getConnection("jdbc dbc:Manual","","");
Connection con = DriverManager.getConnection("jdbc dbc:Manual");

Make sure that about the capital letters in the above statement regarding the datasource .... is it actually "manual" or "Manual"

I agree. Here's the link: http://aspose.com/file-tools
subject: JDBC getConnection question
It's not a secret anymore!