Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
i have a problem that i need to connect to two databases concurently to retrieve records. But i never try more than one database before i use the same way of databases connection format by chnaging the variables name, the result still from previous database that i connect. this is my code: Dim con, recordSet Dim con1, recordSet1 'Create a connection to ms sql server Set con = CreateObject("ADODB.Connection") Set recordSet = CreateObject("ADODB.Recordset") con.Provider = "SqlOleDB" con.Properties("Data Source").Value = "localhost" con.Properties("Initial Catalog").Value = "bbiprod" con.Properties("Integrated Security").Value = "SSPI" con.Open Set con1 = CreateObject("ADODB.Connection") Set recordSet1 = CreateObject("ADODB.Recordset") con1.Provider = "SqlOleDB" con1.Properties("Data Source").Value = "localhost" con1.Properties("Initial Catalog").Value = "bbidev" con1.Properties("Integrated Security").Value = "SSPI" con1.Open Please help me......thank you yea. regards, vanessa -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
databases | Excel Worksheet Functions | |||
Databases | Excel Discussion (Misc queries) | |||
connecting to databases | Excel Discussion (Misc queries) | |||
LINK DATABASEs | New Users to Excel | |||
DATABASES | Excel Discussion (Misc queries) |