The provider is not compatible with the version of Oracle client RRS feed

  • Question

  • User1112637402 posted

    We are getting following error message while trying to execute sql package thru ‘ExecuteNonQuery’ our .NET code.

    This was working perfectly few days back, but suddenly VS2008 on our local is not able to execute the code.

    We are not sure what had exactly happened here, but code stopped working  on all develop machine all of sudden 


    Details for the error are as follows

    "The provider is not compatible with the version of Oracle client" or sometimes "Typeinitializer exception"

    We were using oracle.dataacess.dll version which was working fine.It still works fine when we deploy it in the production.

    We checked the GAC of the developer machines and Server,i found one difference that in the GAC of the server only the is installed while on the developer machines,two version of oracle.client are installed in the GAC,one is and the other is

    When we run the code,it might be the case that .net framework is picking up and that may be the problem,so we tried to include it in our project and that still gave us the same error !.We requested to uninstall from developer machines but client refuses to uninstall that its security fix and can not remove it !

    Than we thought to upgrade the version of oracle.dataacess.dll to and code started working but it started giving onther trouble..which is

    Whenever any stored procedure is executed from the asp.net code, it checks whether  the output parameter  of the procedure (which is  mostly named  o_ERR_MSG ) does not contain any error message. If it contains than it throws message to on the GUI.

    I don’t know but somehow when procedure completes execution successfully than It returns  string “null”  rather than returning NULL object..

    In our coding, everywhere after executing procedure, following condition for o_ERR_MSG being NULL is checked

    For example :
                 If IsDBNull(cmdSEC.Parameters("o_ERR_MSG").Value) Then
                    arySecData.Add(DBNull.Value)(go  ahead with execution)
                    ErrMsg = cmdSEC.Parameters("o_ERR_MSG").Value.ToString()
                    Throw ErrOut (error thrown from stored procedure)
                End If

    As our parameter o_ERR_MSG has string value “null”   , application thinks that’s an error message passed from PL/SQL stored procedure so it displays “null”  on the  screen and redirects it to login screen

    However when I modified the condition like :

    If IsDBNull(cmdSEC.Parameters("o_ERR_MSG").Value) Or cmdSEC.Parameters("o_ERR_MSG").Value.ToString = "null"  Then
                    ErrMsg = cmdSEC.Parameters("o_ERR_MSG").Value.ToString()
                    Throw ErrOut
                End If

    Than it continues execution smoothly. I don’t know if “null” started coming instead of NULL object  due to version change of oracle.dataacess.dll or what but we have such checks in our application at many places.

    Guys i'm stuck...Can u please suggest options ?? Cry



    Friday, September 10, 2010 2:23 AM

All replies

  • User-1131243847 posted


    I had a scenario where .Net Web App and Oracle 10g

    When does this occur :

    1. Installed  Oracle 10g Client, made sure Oracle.DataAccess.dll  is taken from Oracle installation directory, for ex: E:\oracle\product\10.2.0\db_1\ODP.NET\bin
    2. And copied to APPlicationDIR\Bin directory, Build works fine…
    3. Made local virtual directory http://localhost/Webportal  and login page with credentiails 
    4. At run time, this exception occurs…  But it runs with local VS development server…


    If we install Oracle10g from

    10204_vista_w2k8_x64_production_db – this would be comprise of 64-bit (Oracle.DataAccess.dll  ) dlls

    Else,       10203_vista_w2k8_x86_production_db – this would be 32-bit dlls



    Now we have to make sure in IIS mmc,  Application Pool (ASPnetV4.0) settings -à watch out Enable 32-bit applications property, if installation is x86 – property should be true,

    Else 64 bit – should be false, that resolved the runtime error…

    Hope it helps

    Tuesday, April 12, 2011 12:34 PM