OpenRecordSet giving Type Mismatch error

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 ?

Thanks






Comments

  • : 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 ?

    : Thanks

    :

    :

    :



    If you have run the upgrade to 2.5x after the dll was created then make sure that your references in the .vbp (use notepad) are correct for 2.57*. This caught me too...

    Justin


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories