Error connecting to Oracle with Classic ASP on IIS7

I just replaced the hard drive on my Windows 7 machine (my development computer). I did not have any issues with this working on the old hard drive, but I think I remember I had to change something or install something, but I do not remember.

The following code works perfectly on my live machine (Windows 2003 with IIS6).

OracleConn = "Provider=MSDASQL.1;Persist Security Info=True;User ID=TheUID;Password=ThePW;DSN=TheDB;DBQ=ORA_PRD1;"

SqlStr = "SELECT * FROM TestTable WHERE Somefield = 'Something'"
Set Objrs = Server.CreateObject("ADODB.RecordSet")
Objrs.Open SqlStr, OracleConn, adOpenStatic, adLockOptimistic,adCmdText
While Not Objrs.EOF
Response.Write "Some Stuff and whatever <br>"
Objrs.MoveNext
Wend
Objrs.Close
Set Objrs = Nothing

When I run it, I am getting the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

I did create a .udl file to get the connection string and to test the database connection and it works fine. I also have an app on my computer that uses the same ODBC drivers to connect to the same database and it works fine.

I dont have any issues connecting to an Access database at all. Connecting to Oracle seems to be the only issue I am having.

1 answer

Did you create your ODBC DSN as a "SYSTEM DSN" (not "FILE DSN" or "USER DSN") in the ODBC manager?