aspose file tools*
The moose likes JDBC 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
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
 
 
subject: how to create dsn at runtime