Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to DSN or not to DSN that is the question

Status
Not open for further replies.

KnightCoder

Programmer
Jan 30, 2001
16
0
0
GB
In ASP you don't necessarily need to connect to a database via a DSN. You can in essence map the path to the DB[(C:/db/etc.mdb) or even (../db/etc.mdb)] and giving the extra information, what drivers you need, respectively.

Is their an equivalent in java. I do not want to create a DSN and want to map to a database where the class being executed is in its local root and the database resides in a subfolder (db/Access.mdb).

If this is possible. Any Code will be welcome

Regards.
 
Well, since Java uses JDBC (not ODBC) there is no need for a DSN if you have a JDBC driver. Unfortunately for you, unless you want to buy a third party component, you will need to use a DSN to connect to an Access Database. This is because there are no free Access JDBC drivers (that I know of at least) so you will need to use the Sun JDBC-ODBC Bridge which requires the use of a DSN.

Hope that answers your question. Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top