5 <li>ADO.NET Data Provider for <a href="http://www.oracle.com/">Oracle</a> databases</li>
7 <li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
9 <li>Works on Windows and Linux</li>
11 <li>Works with Oracle 8i and 9i.</li>
13 <li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
16 <li>Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model</li>
18 <li>Created by Daniel Morgan and Tim Coleman</li>
20 <li>Bugs with Mono or the data provider should be reported
21 in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
22 do not have Bugzilla user account, it is free
24 create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
31 <li>OracleConnection can connect and disconnect to an Oracle 8i or 9i database on
32 Windows and Linux via OCI (Oracle Call-level Interface)</li>
34 <li>Can have multiple connections with different transactions where each transaction is
35 separated from the others, so a rollback or commit in one transaction
36 does not affect the other.</li>
38 <li>Can execute simple DML SQL statements, such as,
39 INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
41 <li>Can retrieve data via ExecuteReader and OracleDataReader. Currently,
42 supports character, numeric, some date data types. ExecuteScalar
45 <li>Simple input parameters (character and numeric data) can now
46 be used in SQL queries. Output parameters do not yet work.</li>
48 <li>OracleException and Error handling exists now.</li>
50 <li>Message handling needs to be added for non-critical messages
51 received from Oracle</li>
53 <li>Handling of various data types need to be added.</li>
55 <li>Data Adapter exists, and a DataSet can be filled using it.</li>
57 <li>Lots of missing functionality and bugs.</li>
59 <li>Works with SQL# command-line and GTK# GUI versions.</li>
66 <li>Be able to retrieve results via a data reader (WORKING)</li>
67 <li>Parameters support (IN PROGRESS)</li>
68 <li>transactions (WORKING)</li>
69 <li>Stored Procedures, Functions, and Packages support</li>
70 <li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
71 <li>Support for Oracle 8i on Linux and Windows (WORKING)</li>
72 <li>Support for Oracle 9i on Linux and Windows (WORKING)</li>
73 <li>Support for Oracle 10g on Linux and Windows [TODO]. Please let us
74 know on mono-list if Mono OracleClient works with Oracle 10g or not. If not, what errors do you get</li>
75 <li>Support Large OBjects</li>
76 <li>Support all the data types</li>
77 <li>Implement Connection pooling</li>
82 ** Testing System.Data.OracleClient
85 <li>Have a working mono and mcs</li>
87 <li>Have access to an Oracle 8i or 9i database or download it from
88 <a href="http://www.oracle.com/">Oracle</a>. If you are connecting
89 remotely to an Oracle database, you need the Oracle client software.
90 Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
91 I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
93 <li>Make sure System.Data.OracleClient.dll assembly is built.</li>
95 <li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
97 <li>The Data Source is an Oracle TNSNAME</li>
99 <li>Has a connection string format:
101 "Data Source=tnsname;User ID=userid;Password=password"
108 using System.Data.OracleClient;
112 public static void Main (string[] args)
114 string connectionString =
115 "Data Source=testdb;" +
118 OracleConnection dbcon = null;
119 dbcon = new OracleConnection (connectionString);
121 OracleCommand dbcmd = dbcon.CreateCommand ();
122 string sql = "SELECT ename, job FROM scott.emp";
123 dbcmd.CommandText = sql;
124 OracleDataReader reader = dbcmd.ExecuteReader ();
125 while (reader.Read ()) {
126 string employeeName = (string) reader["ename"];
127 string job = (string) reader["job"];
128 Console.WriteLine ("Employee Name: {0} Job: {1}",
134 dbcmd.CommandText = sql;
135 dbcmd.ExecuteNonQuery ();
144 <li>Building C# Example:
146 <li>Save the example to a file, such as, TestExample.cs</li>
149 mcs TestExample.cs -r System.Data.dll \
150 -r System.Data.OracleClient.dll
153 <li>Build on Windows:
155 mcs TestExample.cs /r:System.Data.dll \
156 /r:System.Data.OracleClient.dll
161 <li>Running the Example: