How to connect Classic ASP 32 bits on windows 2008 64 bits using IBM DB2 ODBC DRIVER?
Posted on 2011-10-31
I am trying to connect a classic asp application to a db2 database using the IBM DB2 ODBC DRIVER, this code works perfectly in 32 bits environment, and i need this to run in a windows 2008 64 bits ii7, i already enabled the 32 bits option in the application pool,also i ran the command c:\Windows\SysWOW64\odbcad32.exe to configure the odbc in 32 bits, the odbc works perfectly with .net applications using oledb, but i cant still make it work in classic asp using code like the one below (demo).
ConnectionString = "DSN=MYDSN;UID=user;PWD=password;"
Set MyConnection = Server.CreateObject("ADODB.Connection")
it breaks after running MyConnection.Open(ConnectionString) the error unfortunatelly says error occurred on the server when processing the URL, and if i try to show the err.description it says [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
the DSN in 64 bits has the same name as the DSN in 32 bits, so i decided to try using a different name "MYDSN_32" but i get this other error.
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
thank you in advance for all your recommendations.