X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=web%2Foracle;h=921954aef0b1ea1248b32d921efc734cd777418e;hb=fc0570d6c7bdbe57600ea3afdd3d05a902f12df9;hp=dfa77a4eb872c23b78eddf1e642b2c3ab08fde97;hpb=e0e8de2d7da34fdd30482c208571122e7c808deb;p=mono.git
diff --git a/web/oracle b/web/oracle
index dfa77a4eb87..921954aef0b 100755
--- a/web/oracle
+++ b/web/oracle
@@ -1,15 +1,32 @@
* Oracle Data Provider
+
- ADO.NET Data Provider for Oracle databases
+
- Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient
+
- Works on Windows and Linux
+
- Works with Oracle 8i
+
+ - Untested, but should work with Oracle 9i
+
- Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
software
+
- Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model
+
- Created by Daniel Morgan and Tim Coleman
+
- Does not support trusted connections
+
+ - Bugs with Mono or the data provider should be reported
+ in Mono's Bugzilla here. If you
+ do not have Bugzilla user account, it is free
+ and easy to
+ create one here.
+
** Current Status
@@ -22,31 +39,51 @@
assembly and the oci library). In Current Mono cvs, System.Data.OracleClient
directly platform invokes into the oci library thanks to Tim Coleman.
+ Can have multiple connections with different transactions where each transaction is
+ separated from the others, so a rollback or commit in one transaction
+ does not affect the other.
+
Can execute simple DML SQL statements, such as,
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method
-
+
The System.Data.OracleClient.dll assembly can be built with mcs/mono via
the makefile.gnu for System.Data.OracleClient or csc/.net via the
System.Data.OracleClient.build nant build file.
- Can NOT retrieve data yet. ExecuteReader() and ExecuteScalar() in OracleCommand
- and OracleDataReader need to be implemented.
+ Can retrieve data via ExecuteReader and OracleDataReader. Currently,
+ supports character, numeric, some date data types. ExecuteScalar
+ also works.
+
+ Simple input parameters (character and numeric data) can now
+ be used in SQL queries. Output parameters do not yet work.
+
+ OracleException and Error handling exists now.
+
+ Message handling needs to be added for non-critical messages
+ received from Oracle
+
+ Handling of various data types need to be added.
+
+ Data Adapter exists, and a DataSet can be filled using it. The
+ Data Adapter is abstract enough that it should work as expected.
Lots of missing functionality and bugs.
- Error handling has been started.
+ Works with SQL# command-line and GTK# versions in cvs. Only works with
+ simple character data though. SQL# For GTK# can only show the results to
+ the TextView because the Data Adapter is not yet available
** Action Plan
- - Be able to retrieve results via a data reader
- - Parameters support
- - transactions
+ - Be able to retrieve results via a data reader (WORKING)
+ - Parameters support (IN PROGRESS)
+ - transactions (WORKING)
- Stored Procedures, Functions, and Packages support
- - Be able to fill a DataTable in a DataSet via a data adapter
- - Support for Oracle 8i and 9i
+ - Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)
+ - Support for Oracle 8i and 9i (UNKNOWN)
- Support LOBs
- Support all the data types
- Implement Connection pooling
@@ -62,7 +99,7 @@
- Have access to an Oracle 8i database or download it from
Oracle. If you are connecting
remotely to an Oracle database, you need the Oracle client software.
- Registration to the Oracle Technology Network is free. If installing on Linux,
+ Registration to the Oracle Technology Network is free. If installing on Linux,
I suggest you do a lot of searching to see how others installed Oracle on Linux.
- Make sure System.Data.OracleClient.dll assembly is built, if not, go
@@ -86,28 +123,33 @@
public class Test
{
- public static void Main(string[] args)
+ public static void Main (string[] args)
{
string connectionString =
"Data Source=testdb;" +
"User ID=scott;" +
"Password=tiger;";
IDbConnection dbcon;
- dbcon = new OracleConnection(connectionString);
- IDbCommand dbcmd = dbcon.CreateCommand();
- string sql =
- "insert into scott.emp " +
- "(empno, ename, job, sal, deptno) " +
- "values(123," +
- "'Don Smith'," +
- "'Cook'," +
- "23021," +
- "20)";
+ dbcon = new OracleConnection (connectionString);
+ dbcon.Open ();
+ IDbCommand dbcmd = dbcon.CreateCommand ();
+ string sql = "SELECT ename, job FROM scott.emp";
+ dbcmd.CommandText = sql;
+ IDataReader reader = dbcmd.ExecuteReader ();
+ while (reader.Read ()) {
+ string employeeName = reader["ename"];
+ string job = reader["job"];
+ Console.WriteLine ("Employee Name: {0} Job: {1}",
+ employeeName, job);
+ }
+ // clean up
+ reader.Close ();
+ reader = null;
dbcmd.CommandText = sql;
- dbcmd.ExecuteNonQuery();
- dbcmd.Dispose();
+ dbcmd.ExecuteNonQuery ();
+ dbcmd.Dispose ();
dbcmd = null;
- dbcon.Close();
+ dbcon.Close ();
dbcon = null;
}
}