wood burning stoves 2.0*
The moose likes JDBC and the fly likes how to create a dsn through java program 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 "how to create a dsn through java program" Watch "how to create a dsn through java program" New topic
Author

how to create a dsn through java program

salamath ahamed
Greenhorn

Joined: Aug 11, 2003
Posts: 7
hi all javaites
i need a little help on program , i have developed a java desktop application with access database.i did evertyhing fine and the program is working, but my concern is that i have go to control panel to create a dsn manually , is it possible to create a dsn from inside the java program itself , so that any one who uses the program need not go and create dsn for this application. if any one knows the solution please reply
thank you buddies


salamath
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Creating a DSN entry is a Windows Specific function. You can't manipulate the ODBC settings from within a pure java applicaiton. Windows does have some pretty darn good documentation on the ODBC SDK so if you wanted to try your hand at some JNI to call native windows functions from JAVA, more power to you. I woulldn't want to do it.
Just out of curiosity...Why are you using the ODBC bridge to connect to your database? You should be using a Type IV Driver and screw the ODBC. ODBC is bulky and slow.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a dsn through java program
 
Similar Threads
how to create dsn at runtime
Oracle 9i and SQL Server 2000 why the difference???
Creating DSN
Dynamic DSN creation
dsn less connection