Avatar of Wilder1626
Wilder1626Flag for Canada

asked on 

VB.Net - The provider is not compatible with the version of oracle client

Hi again.

I'm facing an issue where i'm trying to connect to Oracle Home client 11g 32 bits.

I'm getting below error:

the provider is not compatible with the version of oracle client

I took from from the new Install Oracle folder ODP.NET / BIN / 2x the Oracle.DataAccess.dll
Then, i pasted in the folder bin\Debug\net5.0-windows, where the exe his situated.

Then i added the reference inside the project as below

User generated image
After all this, i'm getting the error: The provider is not compatible with the version of oracle client
User generated image

The error i have is on:
cmd As New OracleCommand(sql)

Open in new window

The code i have is below;
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Dim oradb As String = "Data Source=datasource;User Id=user;Password=password;"
        Dim conn As New OracleConnection(oradb)
        Dim connect As Object = Nothing

            ' connect.Enabled = False

            Dim sql As String = "Select name from client'"

            Dim cmd As New OracleCommand(sql)
            cmd.CommandType = CommandType.Text

            Dim dr As OracleDataReader = cmd.ExecuteReader()


        Catch ex As Exception

        End Try
    End Sub
End Class

Open in new window

What do i need to look at to fix the problem?

I'm pretty new to Visual Studio 2019.

Thanks for your help.
Visual Basic.NETOracle Database

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)
Avatar of Peter Chan
Peter Chan
Flag of Hong Kong image

It is due to incompatible Oracle client version. What Oracle DB version are you using?
Avatar of Wilder1626
Flag of Canada image


i'm using Oracle 11g version 11.2.0

H:\>tnsping instance_name
TNS Ping Utility for 32-bit Windows: Version - Production on 27-JUL-2021 07:42:02
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
Used parameter files:
TNS-03505: Failed to resolve nameTNS-03505: Failed to resolve name

I have also registered as an administrator:

User generated image
I have also ran that below scrip in Powershell:

User generated image

User generated image

Here are the References on the project