How to make ODBC connection through combo selection
I'm using VB.6 & SQL server 2000. Problme is I have two data base and I want to work it on one plat form. I've connected to sql server through ODBC connection but problem is..... how can i make connection to either of Data Base through combo selection so that when i select particular database it connect to it.
Here is my code that connection to dbase:
Public Const gConnection = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=Description=LSSCE;DRIVER=SQL Server;SERVER=SONAMG\BBE;UID=sa;APP=Visual Basic;WSID=SONAMG;DATABASE=BBE;Network=DBMSLPCN"