Rewrite code from DAO to ADO

P

Pierre Doré

Within an Access 2007 .mdb, I need to establish a connection to an Oracle 10
table in order to update that table. I'm not able to establish that
connection. Here is the code below:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As ADODB.Command

Set cn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset

cn = "Provider='msdaora';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='xxxxxxxx';"
'get Run-time error '6' overflow error on next line of code."
cn.Open

SOS

Pierre
 
D

Douglas J. Steele

Try:

cn.Provider = "Driver='msdaora';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='xxxxxxxx';"
cn.Open
 
P

Pierre Doré

Thx for your response. However, I now get the following error message
Unrecoverable error
:provider cannot be found. It may not be properly installed. [3706]

Pierre
 
P

Pierre Doré

I get the same error message when I replace the connection string code to the
Oracle driver:

cn.Provider = "Driver='OraOLEDB';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='aciis8adm';"


Pierre Doré said:
Thx for your response. However, I now get the following error message
Unrecoverable error
:provider cannot be found. It may not be properly installed. [3706]

Pierre

Douglas J. Steele said:
Try:

cn.Provider = "Driver='msdaora';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='xxxxxxxx';"
cn.Open
 
D

Douglas J. Steele

I'm not sure your connection string is correct. Take a look at
http://www.connectionstrings.com/oracle

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Pierre Doré said:
I get the same error message when I replace the connection string code to
the
Oracle driver:

cn.Provider = "Driver='OraOLEDB';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='aciis8adm';"


Pierre Doré said:
Thx for your response. However, I now get the following error message
Unrecoverable error
:provider cannot be found. It may not be properly installed. [3706]

Pierre

Douglas J. Steele said:
Try:

cn.Provider = "Driver='msdaora';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='xxxxxxxx';"
cn.Open


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Within an Access 2007 .mdb, I need to establish a connection to an
Oracle
10
table in order to update that table. I'm not able to establish that
connection. Here is the code below:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As ADODB.Command

Set cn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset

cn = "Provider='msdaora';Data Source='ACIIS';User
Id='ACIIS_ADMIN';Password='xxxxxxxx';"
'get Run-time error '6' overflow error on next line of code."
cn.Open

SOS

Pierre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top