Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.connection fails

Status
Not open for further replies.

sabev

Programmer
Sep 27, 2002
47
US
This is my first shot at ASP but I do have a fair amout of VBA experiance.

Anyway, My ADODB.Connection fails in the ASP page

CODE -
set conShark = Server.CreateObject("adoDB.CONNECTION")
conShark.Open "DSN=SYSinformix33;UID=test;PWD=test"

ERROR in IE 5.5 -
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
/asp/test1.asp, line 64

The DSN is good. It works when you perform a test connect in the ODBC manager, as well as a different VB application.

I get the same error when I use a connect string instead of a DSN.

I don't get an error when I create the ADODB object. It happens when trying to open it.

Any ideas what may be causing the error. I've run out of ideas.

Thanks

Doug
 
Hi, Have you tried using a DSN-less connection?

Like this one ( For Oracle, but should be close)
Code:
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30

'Code to connect to Oracle Warehouse
 objDC.Open "Provider=MSDAORA.1;Password=password;User ID=username;Data Source=myora;Persist Security Info=TRUE"

[profile]
 
Yep, sure have. I even used a .uld (data link) file to create the connection string. The .uld completes the test connect just fine.

I get the same error as when using the connection string as with the DSN.

 
I got it -

From -

In most cases, this error message is purely informational, and does not indicate that anything terrible has happened while connecting to the database. To avoid the error, you can use on error resume next, and then check each error in the conn.errors collection -- if any number is 0, it can be ignored.
 
Hi, Don't ya just love it...An error message that does not indicate a real error...Only Microsoft could come up with that![smile]

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top