This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes configuring dsn connection automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "configuring dsn connection automatically" Watch "configuring dsn connection automatically" New topic
Author

configuring dsn connection automatically

Devu Shah
Ranch Hand

Joined: Jun 21, 2001
Posts: 50
I would like to configure my dsn connection automatically instead of doing it manually through control panel , Could any one suggest me an software which would do this for me on start of my application or is there any standard java program available to do it plaese do reply
thanku
surya kumar mp
Greenhorn

Joined: Sep 30, 2001
Posts: 13
HI
You can create DSN on fly to Any database in the following fashion
String url = "jdbc dbc river={Microsoft Access Driver (*.mdb)};DBQ=f:\\Screen\\surya.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =DriverManager.getConnection(url);
Surya.MP
--------------------------------------------------
Originally posted by Devu Shah:
I would like to configure my dsn connection automatically instead of doing it manually through control panel , Could any one suggest me an software which would do this for me on start of my application or is there any standard java program available to do it plaese do reply
thanku

surya kumar mp
Greenhorn

Joined: Sep 30, 2001
Posts: 13
HI
You can create DSN on fly to Any database in the following fashion
String url = jdbc dbc river={Microsoft Access Driver (*.mdb)};DBQ=f:\\Screen\\surya.mdb;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =DriverManager.getConnection(url);
Surya.MP
--------------------------------------------------
Originally posted by Devu Shah:
I would like to configure my dsn connection automatically instead of doing it manually through control panel , Could any one suggest me an software which would do this for me on start of my application or is there any standard java program available to do it plaese do reply
thanku

 
Don't get me started about those stupid light bulbs.
 
subject: configuring dsn connection automatically
 
Similar Threads
working with access?
Query about DSN and DSN less Connection??
ODBC Remote DSN Connection on AS 400
DSN problem
Topspeed INSERT statement issue