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 and 9i (WORKING)</li>
73 <li>Support all the data types</li>
74 <li>Implement Connection pooling</li>
76 <li>Once Oracle 10g is released, make sure Mono works with Oracle 10g.</li>
80 ** Testing System.Data.OracleClient
83 <li>Have a working mono and mcs</li>
85 <li>Have access to an Oracle 8i or 9i database or download it from
86 <a href="http://www.oracle.com/">Oracle</a>. If you are connecting
87 remotely to an Oracle database, you need the Oracle client software.
88 Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
89 I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
91 <li>Make sure System.Data.OracleClient.dll assembly is built.</li>
93 <li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
95 <li>The Data Source is an Oracle TNSNAME</li>
97 <li>Has a connection string format:
99 "Data Source=tnsname;User ID=userid;Password=password"
106 using System.Data.OracleClient;
110 public static void Main (string[] args)
112 string connectionString =
113 "Data Source=testdb;" +
116 OracleConnection dbcon = null;
117 dbcon = new OracleConnection (connectionString);
119 OracleCommand dbcmd = dbcon.CreateCommand ();
120 string sql = "SELECT ename, job FROM scott.emp";
121 dbcmd.CommandText = sql;
122 OracleDataReader reader = dbcmd.ExecuteReader ();
123 while (reader.Read ()) {
124 string employeeName = (string) reader["ename"];
125 string job = (string) reader["job"];
126 Console.WriteLine ("Employee Name: {0} Job: {1}",
132 dbcmd.CommandText = sql;
133 dbcmd.ExecuteNonQuery ();
142 <li>Building C# Example:
144 <li>Save the example to a file, such as, TestExample.cs</li>
147 mcs TestExample.cs -r System.Data.dll \
148 -r System.Data.OracleClient.dll
151 <li>Build on Windows:
153 mcs TestExample.cs /r:System.Data.dll \
154 /r:System.Data.OracleClient.dll
159 <li>Running the Example: