| Author |
how we can create database connection dynamically.
|
ashish jadhav
Ranch Hand
Joined: Nov 20, 2008
Posts: 62
|
|
Hi,
i want create one application in that application we read DSN name,table name,url etc. database related information and as per that information i want to create DB connection.means when any user can change only text file data from that data connect to perticular DB. please help me
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
|
Use .properties file to load the DSN , user name, etc information from the file. Use Properties class to read file data OR Use java properties file example to get more information.
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
ashish jadhav
Ranch Hand
Joined: Nov 20, 2008
Posts: 62
|
|
|
Thanks sagar..
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
You're welcome
|
 |
ashish jadhav
Ranch Hand
Joined: Nov 20, 2008
Posts: 62
|
|
Hi sagar,
I have developed a DB application, using this web application we can connect to any DB and TABLE. Just we have to type DB name and TABLE name in the properties file in key-value pair format.
when our web application runs it automatically read table related information from properties file and connect to specified table.
Now i want to create my own API for this application, so we can use this application anywhere through API.
Do you have any idea??please inform me.
|
 |
 |
|
|
subject: how we can create database connection dynamically.
|
|
|