C
Colin Steadman
I'm updating a template that currently uses DAO and an
Ingres ODBC DSN to connect to a database and retrieve
data. I would like to switch to ADODB but I'm unsure if I
can do this.
I've been looking at the Provider examples at -
http://www.able-
consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLED
BProviderForSQLServer
But Ingres is not listed. Does this mean I can't use
ADODB to connect? Or is there some kind of generic
Provider that I could try?
If it helps, my connection code looks something like this
as it stands (bare bones version) -
==========================================================
Public ws As DAO.Workspace
Public cn As DAO.Connection
Public rs As DAO.RecordSet
Sub AutoNew()
Set ws = DBEngine.CreateWorkspace
("MyWorkspace", "admin", "", dbUseODBC)
Set cn = ws.OpenConnection("ODBCConnection",
dbDriverNoPrompt, _
False, "ODBC;DATABASE=live;UID=;PWD=;DSN=ingres_db")
SQL = "select this, that, other from table where this
= 'something'"
Set rs = cn.OpenRecordset(SQL)
'Now do somthing with the data.
End Sub
==========================================================
TIA,
Colin
Ingres ODBC DSN to connect to a database and retrieve
data. I would like to switch to ADODB but I'm unsure if I
can do this.
I've been looking at the Provider examples at -
http://www.able-
consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLED
BProviderForSQLServer
But Ingres is not listed. Does this mean I can't use
ADODB to connect? Or is there some kind of generic
Provider that I could try?
If it helps, my connection code looks something like this
as it stands (bare bones version) -
==========================================================
Public ws As DAO.Workspace
Public cn As DAO.Connection
Public rs As DAO.RecordSet
Sub AutoNew()
Set ws = DBEngine.CreateWorkspace
("MyWorkspace", "admin", "", dbUseODBC)
Set cn = ws.OpenConnection("ODBCConnection",
dbDriverNoPrompt, _
False, "ODBC;DATABASE=live;UID=;PWD=;DSN=ingres_db")
SQL = "select this, that, other from table where this
= 'something'"
Set rs = cn.OpenRecordset(SQL)
'Now do somthing with the data.
End Sub
==========================================================
TIA,
Colin