4 <li> Provides a OleDb-like provider for Mono
5 using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
7 <li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
9 <li>Created by Rodrigo Moya</li>
11 <li>LibGDA has providers for:</li>
13 <li><a href="http://www.mysql.com/">MySQL</a></li>
14 <li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
16 <li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
17 <li><a href="http://www.oracle.com/">Oracle</a></li>
18 <li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
19 <li><a href="http://www.sybase.com/downloads">Sybase</a> and
20 <a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
21 via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
22 <li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
23 <li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
24 <li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
25 (via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
29 <li>Does not support trusted connections</li>
31 <li>Bugs with Mono or the data provider should be reported
32 in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
33 do not have Bugzilla user account, it is free
35 create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
42 <li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
43 The C-Sharp bindings to libgda currently work - meaning they can compile, run,
44 and you can connect to a
45 PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
48 functionality (execution of commands, data retrieval, transactions, etc) are
51 <li>An inital implementation of GetSchemaTable() for
52 the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
53 but the foundation is there.</li>
58 <li>Current focus is on filling up the missing pieces (Data adapters
59 mainly) and schema support.</li>
61 <li>We need help building libgda on Windows though. libgda
62 builds find on linux though.</li>
64 <li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
67 ** Testing OleDb with libgda's PostgreSQL provider
70 <li>Requires a working mono and mcs</li>
71 <li>Requires Linux because the OleDb provider uses libgda and libgda only
73 <li>Connection String format: "Provider=providerName;...". providerName is the
74 name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
75 means that the connection parameters are dependent upon the provider being used and
76 are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
78 <li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
79 <li>C# Example for Mono's System.Data.OleDb:
83 using System.Data.OleDb;
87 public static void Main(string[] args)
89 // there is a libgda PostgreSQL provider
90 string connectionString =
91 "Provider=PostgreSQL;" +
97 dbcon = new OleDbConnection(connectionString);
99 IDbCommand dbcmd = dbcon.CreateCommand();
100 // requires a table to be created named employee
101 // with columns firstname and lastname
103 // CREATE TABLE employee (
104 // firstname varchar(32),
105 // lastname varchar(32));
107 "SELECT firstname, lastname " +
109 dbcmd.CommandText = sql;
110 IDataReader reader = dbcmd.ExecuteReader();
111 while(reader.Read()) {
112 string FirstName = (string) reader["firstname"];
113 string LastName = (string) reader["lastname"];
114 Console.WriteLine("Name: " +
115 FirstName + " " + LastName);
128 <li>Building C# Example:
130 <li>Save the example to a file, such as, TestExample.cs</li>
133 mcs TestExample.cs -r System.Data.dll
136 <li>Build on Windows via Cygwin:
138 mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
140 -lib:C:/cygwin/home/MyHome/mono/install/lib \
146 <li>Running the Example: