wood burning stoves 2.0*
The moose likes JDBC and the fly likes Database cannot be connected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Database cannot be connected" Watch "Database cannot be connected" New topic
Author

Database cannot be connected

Samarth Mehta
Greenhorn

Joined: Apr 18, 2008
Posts: 1
My java knowledge is very basic
I wanted to know where to store the database so that i can access it from java code
I have the Db in MsAccess
I am using JdbcOdbcDriver
I need the url by which I can connect to the Db
Can you please help me out
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi,

You will have to create a Datasource via your Windows Control Panel.
There's an example at http://www.mundayweb.com/progs/jdbc-odbc-tut.php

It's a bit old, but you'll figure it out.

Herman
[ April 18, 2008: Message edited by: Herman Scheltinga ]
Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171
Originally posted by Herman Scheltinga:
hi,

You will have to create a Datasource via your Windows Control Panel.

[ April 18, 2008: Message edited by: Herman Scheltinga ]


You don't necessarily have to! Example:



Manuel Leiria<br /> <br />--------------<br />Peace cannot be kept by force; it can only be achieved by understanding. <br /> Albert Einstein
 
Don't get me started about those stupid light bulbs.
 
subject: Database cannot be connected
 
Similar Threads
JDBC connect to Oracle 11g
How to call webservice using Servlet give the sample code
Find out if a table exists
How to open .db file?
Java DB - Reset auto-increment primary key