1 * IBM DB2 Data Provider
3 <li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
5 <li>Exists in namespace IBM.Data.DB2 and assembly IBM.Data.DB2</li>
7 <li>The source code exists at mcs/class/IBM.Data.DB2</li>
9 <li>Requires the Call Level Interface to IBM DB2 shared library. This
10 is db2cli.dll on Windows and db2_36.so under Linux.</li>
12 <li>IBM DB2 Provider maintained by Victor Vatamanescu. For questions, complaints or anything else regarding the managed provider <a href="mailto:victor.vatamanescu@hqsoftconsult.com">contact me<a>. </li>
14 <li>Bugs with Mono or the data provider should be reported
15 in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
16 do not have Bugzilla user account, it is free
18 create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
25 <li>Compiles on Windows and Linux. Works on Linux. Still needs testing on Windows.</li>
27 <li>The data provider is officially in beta. Still have missing features.</li>
34 <li>GetSchemaTable implementation.</li>
42 <li>Have working mono and mcs setup</li>
44 <li>Have access to an IBM DB2 database. If you do not have access, download the
45 <a href="http://www-306.ibm.com/software/data/db2/">IBM DB2</a> software. There
46 are versions for Windows, Linux, AIX, and Sun Solaris.</li>
48 <li>Make sure the assembly IBM.Data.DB2.dll was built and installed
49 where the other class libraries are installed.</li>
51 <li>If you do not have the source to mcs, get the source from
52 <a href="http://www.go-mono.com/download.html">here</a></li>
54 <li>Here is a sample ConnectionString:
56 "server=sample;uid=myuserid;pwd=mypwd"
69 public static void Main(string[] args)
71 string connectionString =
72 "server=" + args[0] + ";UID=" + args[1] + ";PWD=" + args[2];
73 DB2Connection cn = new DB2Connection(connectionString);
75 DB2Command cm = new DB2Command("SELECT * FROM schema.employees", cn);
76 DB2DataReader dr = cm.ExecuteReader();
78 Console.WriteLine("{0}:{1}:{2}", dr[0], dr[1], dr[2]);
86 <li>Building C# Example:
88 <li>Save the example to a file, such as, DB2Test.cs</li>
91 mcs DB2Test.cs -r System.Data.dll \
95 <li>Build on Windows via Cygwin:
97 mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
99 -lib:C:/cygwin/home/MyHome/mono/install/lib \
100 -r System.Data.dll -r IBM.Data.DB2.dll
105 <li>Running the Example:
107 mono TestExample.exe sample myuser mypasswd