DSN Error

No matter what I try to enter in my code (ex: "dsn=mydatabase"; "Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;") I get this same error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Then it specifies the line in question. I've done research and tried many different ways of identifying the DSN and nothing works.

Any ideas what the problem is?

Do I need to identify the DSN in my global.asa file and, if so, what's the code for that?

I've checked my System DSN in my ODBC Data Source Administrator, so I know it's there. I'm hitting a brick wall here.

1 answer

Hi
If you're setting up a system dsn, all you have to do is specify the name in the connection string.
"DSN=myDsn;Uid=myUsername;Pwd=;"
exclude things lite Driver={SQL Server Native Client 10.0};Server=myServerAddress; Database=myDataBase;Trusted_Connection=yes;") as in your example.
This should work. If not this might be related to a 64bit/32bit problem. Then you need to setup the dsn using 32bit dsn admin.
Theres another post about it in the forum im copying here
""Hi
ODBC and 64 bit OS is a source of confusion. Im not sure if this is your problem here but It's def worth to check it out. If the app is 32bit WoW and ODBC is configured on a 64bit OS the app won't "see" the connection configured. There is an ODBC admin for the 32bit environment that can be used to configure a 32bit app visible connection. Naming of the different odbcadmin exe files is however a bit confusing.
For 64 bits connections; %WINDIR%\System32\odbcad32.exe
(this is the one you've used in your desctiption from contol panel)
For 32bit connections; %WINDIR%\SysWOW64\odbcad32.exe
Try to setup the connection using this one.
Hope this helps! ""

Does any of this help?