This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes how to create dsn at  runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to create dsn at  runtime" Watch "how to create dsn at  runtime" New topic
Author

how to create dsn at runtime

sushant prabhu
Ranch Hand

Joined: Mar 22, 2001
Posts: 66
Hi
Tell me if this is possible. Instead of creating a dsn using control panel - system - odbc
. Is it possible to create a dsn from within my java program. i dont want to create a dsn before my java program runs but from within my program

Bye
Sushant


Sushant Prabhu<br />SCJP2<br />SCWCD<br />OCA9i
Sachin Dere
Ranch Hand

Joined: Jan 14, 2003
Posts: 80
Hi Sushant,
wht u can do is make a properties file with ur driver name,user,pwd etc and load it through ur programe then to change the driver simple write that properties file and load it again to connect to a diff database.......
hope this helps,
Sachin
kapil Gupta
Ranch Hand

Joined: Dec 17, 2001
Posts: 89
You can use Windows Scripting COM component that makes a DSN programatically that u can use in Java program using JNI or JavaCOM bridge
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: how to create dsn at runtime
 
It's not a secret anymore!