This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes connecting to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connecting to database" Watch "connecting to database" New topic
Author

connecting to database

Saniya Ansari
Ranch Hand

Joined: Sep 30, 2002
Posts: 48
Hi i'm sort of new to jdbc programming.. i was just trying to test how to connect to a db. I have created a db in access. The url i specify is jdbc dbc:MyDatabasename and i'm using the sun.jdbc.odbc.JdbcOdbcBridge driver. When i run the program it says that failed to load the driver and could not find the database source..
now i'm thinking the jdbc driver is alredy with the sun's jdk so do i have to still add something to my class path, thats what i think the problem can be..
secondly i'm planning to use oracle 9i for later tests.. so what is the oracle driver that i can use to connect to the jdbc.. can anybody tell me what the name of the driver is and if i need to download it and if yes which site can i use to do that...
Thanks..
:roll:


SCJP 2
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

it sounds like you didn't register your database as an ODBC datasource in the control panel. When using the jdbc dbc bridge, this is a necessary step in locating the database.
When you move to Oracle ( hopefully sooner than later ), you'll probably use one of these drivers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connecting to database
 
Similar Threads
How to connect Oracle with Java?
Java Class Implementation Logic
JDBC-ODBC driver on Linux
JDBC driver confusion
Connect oracle databse from Websphere 6.1 with OS Authentication