otiemot
asked on
connecting to sybase with ado in vba
Hi,
I'm trying to figure out how to connect to sybase with ado. So far I haven't been able to find many good resources online, as most tutorials seem to be for Access databases. I'm using Sybase ASE 12.x, and vba for Excel 2000. I've got the ADO 2.7 library. I know my driver and OLE DB provider. I also know the db name, port, host. But I keep getting error when trying to create and access the recordset.
Dim conn
Set conn = CreateObject("ADODB.Connec tion")
conn.Provider = "the sybase provider"
conn.Open "Driver={the driver};" & _
"Database=dbName;" & _
"Srvr=someServer;" & _
"Uid=someID;" & _
"Pwd=pass"
Set rs = CreateObject("ADODB.record set")
rs.Open "select userID from table1, conn"
For Each x In rs.fields
MsgBox x
Next
I dont think I set up the Open connection correctly, I'm not even sure what kind of string is supposed to go in there (what are all the connection properties that need to be set). Is there even an ADO reference library anywhere online??
Thanks in advance for any insights provided.
I'm trying to figure out how to connect to sybase with ado. So far I haven't been able to find many good resources online, as most tutorials seem to be for Access databases. I'm using Sybase ASE 12.x, and vba for Excel 2000. I've got the ADO 2.7 library. I know my driver and OLE DB provider. I also know the db name, port, host. But I keep getting error when trying to create and access the recordset.
Dim conn
Set conn = CreateObject("ADODB.Connec
conn.Provider = "the sybase provider"
conn.Open "Driver={the driver};" & _
"Database=dbName;" & _
"Srvr=someServer;" & _
"Uid=someID;" & _
"Pwd=pass"
Set rs = CreateObject("ADODB.record
rs.Open "select userID from table1, conn"
For Each x In rs.fields
MsgBox x
Next
I dont think I set up the Open connection correctly, I'm not even sure what kind of string is supposed to go in there (what are all the connection properties that need to be set). Is there even an ADO reference library anywhere online??
Thanks in advance for any insights provided.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you still need help with this, or can it be closed?