Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/oledb
diff options
context:
space:
mode:
authorDaniel Morgan <monodanmorg@yahoo.com>2003-01-19 20:39:25 +0300
committerDaniel Morgan <monodanmorg@yahoo.com>2003-01-19 20:39:25 +0300
commitc40860f8f6073bf2e89beb08857b7e5b1cfb39bc (patch)
tree9d055e3f00ce5a41a7ddb1afcea68412a652c2ca /web/oledb
parentf8369d1fa5c907ad65e716fb8fec6cfca9221d57 (diff)
2003-01-19 Daniel Morgan <danmorg@sc.rr.com>
* doc/ibmdb2: added file which is new web page about IBM DB2 data provider at Mono.Data.DB2Client * makefile * commands: added ibmdb2 web page to go-mono web site * doc/ado-net: added a couple more developers email, plus made the email spam resistant, added Mono's DB2 data provider to list, added more info about the ProviderFactory and retrieving data using ADO.NET from ASP.NET, add notes about testing, misc cleanup * doc/mysql * doc/postgresql * doc/sqlclient * doc/oracle * doc/tdsclient * doc/firebird * doc/oledb * doc/odbc * doc/sybase * doc/sqlite: added testing notes and C# examples * doc/gtk-sharp: added links for GTK# for Windows svn path=/trunk/mono/; revision=10712
Diffstat (limited to 'web/oledb')
-rwxr-xr-xweb/oledb135
1 files changed, 112 insertions, 23 deletions
diff --git a/web/oledb b/web/oledb
index d1b16252d14..a4f80e53d47 100755
--- a/web/oledb
+++ b/web/oledb
@@ -1,53 +1,142 @@
* OLE DB Provider
+
<ul>
<li> Provides a OleDb-like provider for Mono
- using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.
+ using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
- <li> Exists in namespace System.Data.OleDb and assembly System.Data
+ <li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
- <li>Created by Rodrigo Moya
+ <li>Created by Rodrigo Moya</li>
- <li>LibGDA has providers for:
+ <li>LibGDA has providers for:</li>
<ul>
- <li><a href="http://www.mysql.com/">MySQL</a>
- <li><a href="http://www.postgresql.org/">PostgreSQL</a>
- <li>XML
- <li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)
- <li><a href="http://www.oracle.com/">Oracle</a>
- <li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a>
+ <li><a href="http://www.mysql.com/">MySQL</a></li>
+ <li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
+ <li>XML</li>
+ <li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
+ <li><a href="http://www.oracle.com/">Oracle</a></li>
+ <li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
<li><a href="http://www.sybase.com/downloads">Sybase</a> and
<a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
- via <a href="http://www.freetds.org/">FreeTDS</a>)
- <li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
- <li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
- <li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
- (via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)
+ via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
+ <li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
+ <li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
+ <li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
+ (via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
</ul>
+ </li>
+
+ <li>Does not support trusted connections</li>
</ul>
-* Current Status
+** Current Status
<ul>
<li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
The C-Sharp bindings to libgda currently work - meaning they can compile, run,
and you can connect to a
- PostgreSQL database via libgda via the C-Sharp bindings to libgda.
+ PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
<li>Basic
functionality (execution of commands, data retrieval, transactions, etc) are
- now working.
+ now working.</li>
<li>An inital implementation of GetSchemaTable() for
the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
- but the foundation is there.
+ but the foundation is there.</li>
</ul>
-* Action Plan
+** Action Plan
<ul>
<li>Current focus is on filling up the missing pieces (Data adapters
- mainly) and schema support.
+ mainly) and schema support.</li>
<li>We need help building libgda on Windows though. libgda
- builds find on linux though.
+ builds find on linux though.</li>
+
+ <li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
+ </ul>
+
+** Testing OleDb with libgda's PostgreSQL provider
- <li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET
+<ul>
+ <li>Requires a working mono and mcs</li>
+ <li>Requires Linux because the OleDb provider uses libgda and libgda only
+ works on Linux.</li>
+ <li>Connection String format: "Provider=providerName;...". providerName is the
+ name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
+ means that the connection parameters are dependent upon the provider being used and
+ are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
+ Server, etc...</li>
+ <li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
+ <li>C# Example for Mono's System.Data.OleDb:
+<pre>
+ using System;
+ using System.Data;
+ using System.Data.OleDb;
+
+ public class Test
+ {
+ public static void Main(string[] args)
+ {
+ // there is a libgda PostgreSQL provider
+ string connectionString =
+ "Provider=PostgreSQL;" +
+ "Addr=127.0.0.1;" +
+ "Database=rodrigo";
+ IDbConnection dbcon;
+ dbcon = new OleDbConnection(connectionString);
+ IDbCommand dbcmd = dbcon.CreateCommand();
+ // requires a table to be created named employee
+ // with columns firstname and lastname
+ // such as,
+ // CREATE TABLE employee (
+ // firstname varchar(32),
+ // lastname varchar(32));
+ string sql =
+ "SELECT firstname, lastname " +
+ "FROM employee";
+ dbcmd.ConnectionString = sql;
+ IDataReader reader = dbcmd.ExecuteReader();
+ while(reader.Read()) {
+ string FirstName = reader["firstname"];
+ string LastName = reader["lastname"];
+ Console.WriteLine("Name: " +
+ FirstName + " " + LastName);
+ }
+ // clean up
+ reader.Close();
+ reader = null;
+ dbcmd.Dispose();
+ dbcmd = null;
+ dbcon.Close();
+ dbcon = null;
+ }
+ }
+</pre>
+ </li>
+ <li>Building C# Example:
+ <ul>
+ <li>Save the example to a file, such as, TestExample.cs</li>
+ <li>Build on Linux:
+<pre>
+ mcs TestExample.cs -r System.Data.dll
+</pre>
+ </li>
+ <li>Build on Windows via Cygwin:
+<pre>
+ mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
+ TestExample.cs \
+ -lib:C:/cygwin/home/MyHome/mono/install/lib \
+ -r System.Data.dll
+</pre>
+ </li>
</ul>
+ </li>
+ <li>Running the Example:
+<pre>
+mono TestExample.exe
+</pre>
+</li>
+
+</ul>
+