Get your CodeRanch badge!*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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

 
I agree. Here's the link: http://aspose.com/file-tools
 
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