+ <li>Fixing bugs
+
+ <li>Testing with other setups
+</ul>
+
+** Testing ODBC provider with IBM DB2 Universal Database
+
+<ul>
+ <li>You need a working mono and mcs</li>
+
+ <li>For Unix, you will need unixODBC or iODBC installed</li>
+
+ <li>Have acess to a <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a> or
+ you can download from IBM</li>
+
+ <li>Read these web pages about Unix, ODBC, and IBM DB2
+
+ <ul>
+ <li><a href="http://www.unixodbc.com/doc/db2.html">unixODBC web page about IBM DB2</a></li>
+ <li><a href="http://www-3.ibm.com/software/data/db2/udb/ad/v8/cli/t0010406">IBM web page about unixODBC and DB2</a></li>
+ </ul>
+ </li>
+
+ <li>The ODBC provider is similar to the <a href="http://www.go-mono.com/ibmdb2.html">IBM DB2</a> provider.</li>
+</ul>
+
+** Testing ODBC provider with MySQL
+
+<p>You can test Mono's ODBC provider System.Data.Odbc with the MySQL ODBC driver MyODBC
+
+<p><ul>
+ <li>Take a look at OdbcTest.cs in mcs/class/System.Data/Test</li>
+
+ <li>Here is a ConnectionString format if you have a DSN setup:
+<pre>
+"DSN=dataSetName;UID=myuserid;PWD=mypassword"
+</pre>
+ </li>
+ <li>Here is a ConnectionString format if you do not have a DSN (have not
+ gotten this to work though):
+<pre>
+"DRIVER={MySQL ODBC 3.51 Driver};" +\r
+"SERVER=localhost;DATABASE=test;" +\r
+"UID=myuserid;PASSWORD=mypassword;" +\r
+"OPTION=3";\r
+
+</pre>
+ </li>
+ <li>C# Example:
+<pre>
+ using System;
+ using System.Data;
+ using System.Data.Odbc;
+
+ public class Test
+ {
+ public static void Main(string[] args)
+ {
+ // have an ODBC DSN setup named MYSQLDSN
+ // that accesses a MySQL database via
+ // MyODBC driver for ODBC with a
+ // hostname of localhost and database test
+ string connectionString =
+ "DSN=MYSQLDSN;" +
+ "UID=myuserid;" +
+ "PWD=mypassword";
+ IDbConnection dbcon;
+ dbcon.Open();
+ dbcon = new OdbcConnection(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.CommandText = 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>
+