Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating odbc connections from code

Status
Not open for further replies.

sainan10

Programmer
Jan 30, 2001
1
MO
I have more than one database in SQL7.0.
I have the names of the databases also(at run time)
I need to know how i can change the database connection
during runtime.

That is my program will give the user the choice of selecting a database,that is i will be listing the names of the database. When the user selects a name i have to connect to that particular database. The number of databases which will be listed are the number of user defined databases in SQL. Can anybody help me.
 
dear
you create one string variable.
and place database name selected by user in that string variable name .
eg .
dim str as string

dim con as new ado.connection

con.open str,"UID","pwd"

i think this will help you
pramod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top