• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JDBC getConnection question

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
thanks,
Dave
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

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"
 
Won't you be my neighbor? - Fred Rogers. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic