User269602965 posted
System.Data.OracleClient was deprecated a long time ago.
Download and install the Oracle ODP.NET driver and client.
http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html
You have three options
Unmanaged driver 32-bit Classic ODAC Oracle Data Access Client
Unmanaged driver 64-bit Classic ODAC Oracle Data Access Client
new Managed driver 32-64-bit with client built into the driver, just add the Oracle TNSNAMES.ORA file to you application /BIN folder and the driver with local reference to /BIN folder and connect.
Of course some reading is required to set this up correctly.
http://docs.oracle.com/database/121/TDDDG/toc.htm
http://docs.oracle.com/database/121/ODPNT/toc.htm
The managed driver works in ASP.NET, WPF, and console applications, I use it often. The exception is being new they still are not fully FIPS-140 compliant if you have that enabled in your environment and EF6 support may still be buggy if you hawk the
forums for problems.. But for every day connection, select, update, insert, delete, show stuff in GRIDS, it works well.
The unmanaged driver is legacy, and relies more on VERSION and BITNESS compatibility, GAC installation of policies, and installation of the Oracle client in addition to the drivers. It also works very well and having been around many years, less
buggy for advanced features.
' Get Oracle dataset into .NET dataset for use in DataGrid
Imports System.Xml.Linq.XElement
Try
Dim connectionString As String = ConfigurationManager.ConnectionStrings("AuthenticatedOracleConnectionString").ConnectionString
Dim SQL = _
<SQL>
SELECT PRODUCT_CLASS, AMOUNT_ANNUAL_CONTRACT, COUNT, TOTAL_VALUE
FROM AER2.VW_COUNT_CONTRACTS
</SQL>
Using conn As New OracleConnection(connectionString)
Using cmd As New OracleCommand(SQL.Value, conn)
conn.Open()
Using oda As New OracleDataAdapter(cmd)
Dim ds As New DataSet()
oda.Fill(ds)
Me.RadGrid1.DataSource = ds
Me.RadGrid1.MasterTableView.DataSource = ds
End Using
End Using
End Using
Catch ex As Exception
AppCalls.WriteToEventLog(ex, "Selecting VW_COUNT_CONTRACTS", "ContractAdjust.aspx.vb")
End Try