I have an application that connects to an Oracle database using ODBC. If I run this application everything runs find when I do an openrecordset command. However, I wanted to split the database access into a called DLL. However, when the DLL performs the exact same line of code it fails with an error code 13 - Type Mismatch Error.
The line of code is:
Set rsResults = gdbCurrentDB.OpenRecordset(sSql, dbOpenDynaset)
Bascially, if this exact same line of code runs in an exe, there is no problem, but when it runs as a DLL the problem occurs. I looked on techet and upgraded my version of MDAC to 2.573.4403 as recommended but it made no difference. I checked that the correct references are included in the DLL.
Any ideas ?