Home > Net >  Why my program written with Visual studio 2019 cannot read from Oracle 9i database
Why my program written with Visual studio 2019 cannot read from Oracle 9i database

Time:11-05

I am using Visual studio 2019 and the .Net framework 4.5, I am trying to read an old database made with Oracle 9i but it does not work. I used two libraries

  • Oracle.ManagedDataAccess:

I receive an error which says "ORA-01017: invalid username / password; logon denied" indeed I tried all the solutions already announced: Desable Fips, Install ODAC but it does not work.

  • Oracle.DataAccess.dll :

I receive an error message that says "this provider is not longer supported"

Below the used code:

oracleConnection = new OracleConnection();
    try 
    {
        oracleConnection = new OracleConnection(connectionString);
        oracleConnection .Open();
    }
    catch (Exception ex)
    {
        
    }

Thanks for your help

CodePudding user response:

I receive an error which says "ORA-01017: invalid username / password; logon denied" indeed I tried all the solutions already announced: Desable Fips, Install ODAC but it does not work.

You are connected to the database. If you were not then you would not get an Oracle error message.

To be able to login, you need to follow the instructions in the error message and provide a valid username / password combination. If you do not know the correct username / password then talk to the DBA and get the correct credentials or, if you are the DBA, then login as a SYSDBA user and change the password.

CodePudding user response:

After investigation, the problem is resolved.

It seems that Oracle.ManagedDataAccess does not work well with Oracle 9i and we receive the message "ORA-01017: invalid username / password; logon denied".

Using Oracle.DataAccess.dll, the connection is perfectly established.

If with Oracle.DataAccess.dll we get an error that says "Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. Attempt to load an incorrectly formatted program", then try to run IIsExpress under 64bits mode as described here

thanks for help

  • Related