Pre- .Net Framework 4.0 supported using Oracle.DataAccess.Client, using Oracle.DataAccess.Types, System.Data.OracleClient, OracleDataReader, OracleConnection. What are the equivalents in .Net Framework 4.0? Does it require any download?
I cannot specify:
using Oracle.DataAccess.Client
using Oracle.DataAccess.Types
nor can I use OracleDataReader and OracleConnection.
But, I can specify a <connectionStrings> with providerName="System.Data.OracleClient" and connect to the Oracle database and retrieve data fine.
1) Why does it work when I have no ODAC installed?
I am using Visual Studio 2010 Professional along with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0.
I follow your link and find ODAC for Oracle 11g and Oracle 10g. Since I do not use Oracle 11g, I guess I need to
pick the ODAC for Oracle 10g. But, there is a release for 10.2.0.2.20 but not 10.2.0.4.0.
2) Does it make any difference?
The download includes other items like Oracle Client, SQL*Plus, etc. that I do NOT want to install because I already have them.
3) When installing ODAC, will it give me a choice to NOT install them?
I do not want to mess up my current configurations for Oracle client that I have on the machine. It's not easy to fix this kind of thing when it comes to Oracle.
Below are download information for the two versions:
Oracle 10g Release 2 ODAC and Oracle Developer Tools for Visual Studio .NET
ODTwithODAC1020221.exe 235 MB (247,296,458 bytes)
Oracle Data Access Components (ODAC) for Windows Installation Instructions
32-bit Release 10.2.0.2.21
Oracle Client (10.2.0.1.0)
Download includes the following products:
a) Oracle Data Provider for .NET 1.x (10.2.0.2.20)
b) Oracle Data Provider for .NET 2.0 (10.2.0.2.20)
c) Oracle Database Extensions for .NET 1.x (10.2.0.2.20) -- upgrade only
d) Oracle Database Extensions for .NET 2.0 (10.2.0.2.20) -- upgrade only
e) Oracle Services for Microsoft Transaction Server (10.2.0.1.0)
f) Oracle Provider for OLE DB (10.2.0.2.20)
g) Oracle Objects for OLE (10.2.0.2.20)
h) Oracle Client (10.2.0.1.0)
i) Oracle Universal Installer (10.2.0.2.0)
In certain releases, this download may also include:
j) Oracle Developer Tools for Visual Studio .NET 2003 (10.2.0.2.20)
k) Oracle Developer Tools for Visual Studio 2005 (10.2.0.2.20)
Oracle 11g Release 2 ODAC and Oracle Developer Tools for Visual Studio 11.2.0.1.2
Download Includes
Oracle Developer Tools for Visual Studio 11.2.0.1.2
Oracle Data Provider for .NET 4 11.2.0.1.2
Oracle Data Provider for .NET 2.0 11.2.0.1.2
Oracle Providers for ASP.NET 4 11.2.0.1.2
Oracle Providers for ASP.NET 2.0 11.2.0.1.2
Oracle Database Extensions for .NET 4 11.2.0.1.2 -- for upgrade only
Oracle Database Extensions for .NET 2.0 11.2.0.1.2 -- for upgrade only
Oracle Provider for OLE DB 11.2.0.1.0
Oracle Objects for OLE 11.2.0.1.0
Oracle Services for Microsoft Transaction Server 11.2.0.1.0
Oracle ODBC Driver 11.2.0.1.0
Oracle SQL*Plus 11.2.0.1.0
Oracle Instant Client 11.2.0.1.0
Just download the latest release of oracle it will work for oracle 9i or above so it doesn't matter what version you have as long as it is above 9i. What is important is that you download the version that is right for your .NET famework. I use .NET 4 and
VS 2010 so I downloaded that latest and it works fine here is an example of a property that I wrote to get the Name of a person form their SSN.
Imports Oracle.DataAccess.Types
Imports Oracle.DataAccess.Client
Public Class Employee
''' <summary>
''' Get Name Property of the employee
''' </summary>
''' <param name="SSN">Social Security Number</param>
''' <value></value>
''' <returns>String</returns>
''' <remarks></remarks>
Public Shared ReadOnly Property Name(ByVal SSN As String) As String
Get
Dim NameOfEmp As String = ""
Dim conn As New OracleConnection(ConfigurationManager.ConnectionStrings("<connection string name in web.config>").ConnectionString)
Try
conn.Open()
Dim cmd As New OracleCommand
cmd.Connection = conn
cmd.CommandText = "SELECT name_ind FROM pers_person_tbl WHERE SSN_SM = '" & SSN & "'"
cmd.CommandType = CommandType.Text
Dim dr As OracleDataReader = cmd.ExecuteReader()
dr.Read()
NameofEmp = dr.Item("name_ind")
conn.Dispose()
Catch ex As Exception
conn.Dispose()
End Try
Return NameOfEmp
End Get
End Property
End Class
Click on 'Mark as Answer’ button if this post is useful.
Member
155 Points
1079 Posts
access Oracle database
Aug 24, 2010 07:23 AM|pinky8|LINK
Pre- .Net Framework 4.0 supported using Oracle.DataAccess.Client, using Oracle.DataAccess.Types, System.Data.OracleClient, OracleDataReader, OracleConnection. What are the equivalents in .Net Framework 4.0? Does it require any download?
Thank you.
Participant
1830 Points
375 Posts
Re: access Oracle database
Aug 24, 2010 08:28 AM|om_prakashp|LINK
You need to use the following for .NET 4
http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html
Oracle 11g Release 2 ODAC 11.2.0.1.2 with Oracle Developer Tools for Visual Studio
ODAC 11.2.0.1.2 with Oracle Developer Tools for Visual Studio
Contributor
7260 Points
1902 Posts
Re: access Oracle database
Aug 24, 2010 08:29 AM|nareshguree23@gmail.com|LINK
check here
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html
http://msdn.microsoft.com/en-us/library/77d8yct7.aspx
Member
155 Points
1079 Posts
Re: access Oracle database
Aug 24, 2010 09:34 AM|pinky8|LINK
I cannot specify:
using Oracle.DataAccess.Client
using Oracle.DataAccess.Types
nor can I use OracleDataReader and OracleConnection.
But, I can specify a <connectionStrings> with providerName="System.Data.OracleClient" and connect to the Oracle database and retrieve data fine.
1) Why does it work when I have no ODAC installed?
I am using Visual Studio 2010 Professional along with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0.
I follow your link and find ODAC for Oracle 11g and Oracle 10g. Since I do not use Oracle 11g, I guess I need to
pick the ODAC for Oracle 10g. But, there is a release for 10.2.0.2.20 but not 10.2.0.4.0.
2) Does it make any difference?
The download includes other items like Oracle Client, SQL*Plus, etc. that I do NOT want to install because I already have them.
3) When installing ODAC, will it give me a choice to NOT install them?
I do not want to mess up my current configurations for Oracle client that I have on the machine. It's not easy to fix this kind of thing when it comes to Oracle.
Below are download information for the two versions:
Oracle 10g Release 2 ODAC and Oracle Developer Tools for Visual Studio .NET
ODTwithODAC1020221.exe 235 MB (247,296,458 bytes)
Oracle Data Access Components (ODAC) for Windows Installation Instructions
32-bit Release 10.2.0.2.21
Oracle Client (10.2.0.1.0)
Download includes the following products:
a) Oracle Data Provider for .NET 1.x (10.2.0.2.20)
b) Oracle Data Provider for .NET 2.0 (10.2.0.2.20)
c) Oracle Database Extensions for .NET 1.x (10.2.0.2.20) -- upgrade only
d) Oracle Database Extensions for .NET 2.0 (10.2.0.2.20) -- upgrade only
e) Oracle Services for Microsoft Transaction Server (10.2.0.1.0)
f) Oracle Provider for OLE DB (10.2.0.2.20)
g) Oracle Objects for OLE (10.2.0.2.20)
h) Oracle Client (10.2.0.1.0)
i) Oracle Universal Installer (10.2.0.2.0)
In certain releases, this download may also include:
j) Oracle Developer Tools for Visual Studio .NET 2003 (10.2.0.2.20)
k) Oracle Developer Tools for Visual Studio 2005 (10.2.0.2.20)
Oracle 11g Release 2 ODAC and Oracle Developer Tools for Visual Studio 11.2.0.1.2
Download Includes
Oracle Developer Tools for Visual Studio 11.2.0.1.2
Oracle Data Provider for .NET 4 11.2.0.1.2
Oracle Data Provider for .NET 2.0 11.2.0.1.2
Oracle Providers for ASP.NET 4 11.2.0.1.2
Oracle Providers for ASP.NET 2.0 11.2.0.1.2
Oracle Database Extensions for .NET 4 11.2.0.1.2 -- for upgrade only
Oracle Database Extensions for .NET 2.0 11.2.0.1.2 -- for upgrade only
Oracle Provider for OLE DB 11.2.0.1.0
Oracle Objects for OLE 11.2.0.1.0
Oracle Services for Microsoft Transaction Server 11.2.0.1.0
Oracle ODBC Driver 11.2.0.1.0
Oracle SQL*Plus 11.2.0.1.0
Oracle Instant Client 11.2.0.1.0
Member
155 Points
1079 Posts
Re: access Oracle database
Aug 24, 2010 06:17 PM|pinky8|LINK
help please...
None
0 Points
11 Posts
Re: access Oracle database
Oct 06, 2010 08:52 PM|josiah.inman|LINK
Just download the latest release of oracle it will work for oracle 9i or above so it doesn't matter what version you have as long as it is above 9i. What is important is that you download the version that is right for your .NET famework. I use .NET 4 and VS 2010 so I downloaded that latest and it works fine here is an example of a property that I wrote to get the Name of a person form their SSN.