views:

27

answers:

1

We have a classic ASP application that connects to a COM component. The COM component reads a connection string from the registry and connects to a datasource. We exported the COM package out of a 2003 box and imported into a 2008 R2 box. We've reviewed every setting to ensure its correct. When we hit the classic ASP site, we get the following in the event viewer:

Error Number: -2147467259
Error Description: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Additional Information: SPROC: sprocnamehere
Record Limit0 (User ID: 0)

We've created DSNs on the machine to ensure it could connect. We've setup the IIS anonymous user. We've setup IIS to run in 32-bit mode. Still, same error. Any other ideas? It almost seems as though the COM package is running as 64 bit.

+1  A: 

You're close, but you have probably used the 64-bit version of the ODBC administrator to configure the DSNs. The DSN configuration is stored in the registry and 32-bit and 64-bit processes have different views of the registry. Run c:\windows\syswow64\odbcad32.exe instead. I think. Ask more questions about it at serverfault.com

Hans Passant
Here's the problem. I don't want to use DSNs. I'm trying hard not to use DSNs. Our COM library stores the connection string encrypted in the registry. I just used the 32-bit ODBC administrator so that I can test the connection. And yes, I did use the 32 bit ODBC administrator.
Jason N. Gaylord
Just to ensure that's what I did, I removed all DSNs from the 64-bit ODBC administrator and added a new one in the 32 bit ODBC administrator. The same thing. Error Number: -2147467259 Error Description: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.It has to have something to do with the COM.
Jason N. Gaylord
Why on Earth did you downvote this? I deleted my previous comment, it might have been too helpful. Use serverfault.com
Hans Passant
Why on Earth are you asking me to post this to serverfault.com? Your comment would have been helpful, but I'm not using DSNs. I'll change my vote on your answer, but it doesn't help me. I don't mean for this to come off this way, but I've checked all the obvious things. We've had to access the 32-bit drivers before so I get that.
Jason N. Gaylord