ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ADO connection string error?? (https://www.excelbanter.com/excel-programming/386799-ado-connection-string-error.html)

Brent

ADO connection string error??
 
Here is my code, w/o the username/password:

Dim cn As New ADODB.Connection
..
..
cn.Open "Provider=msdaora;Data Source=qse1.world;User ID=XX;Password=XX"

When I run it in Excel it pauses a few seconds on the cn.Open statement then
gives:

Run-time error '-2147467259(80004005)':
Automation error
Unspecified error

Any suggestions? I have tried just about every form of connection string
and get the same message. Thank you.

Brent


Brent

ADO connection string error??
 
Also, are there any special libraries/references I need for this?


"Brent" wrote:

Here is my code, w/o the username/password:

Dim cn As New ADODB.Connection
.
.
cn.Open "Provider=msdaora;Data Source=qse1.world;User ID=XX;Password=XX"

When I run it in Excel it pauses a few seconds on the cn.Open statement then
gives:

Run-time error '-2147467259(80004005)':
Automation error
Unspecified error

Any suggestions? I have tried just about every form of connection string
and get the same message. Thank you.

Brent


Brent

ADO connection string error??
 
Sorry, went to:

cn.Open "Data Source=qse1;User ID=xx;Password=xx;"

and now it works.

"Brent" wrote:

Also, are there any special libraries/references I need for this?


"Brent" wrote:

Here is my code, w/o the username/password:

Dim cn As New ADODB.Connection
.
.
cn.Open "Provider=msdaora;Data Source=qse1.world;User ID=XX;Password=XX"

When I run it in Excel it pauses a few seconds on the cn.Open statement then
gives:

Run-time error '-2147467259(80004005)':
Automation error
Unspecified error

Any suggestions? I have tried just about every form of connection string
and get the same message. Thank you.

Brent



All times are GMT +1. The time now is 04:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com