lazy Canadians... ;-)
[mono.git] / web / ibmdb2
1 * IBM DB2 Data Provider
2 <ul>
3         <li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
4
5         <li>Exists in namespace IBM.Data.DB2 and assembly IBM.Data.DB2</li>
6         
7         <li>The source code exists at mcs/class/IBM.Data.DB2</li>
8                         
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>
11                         
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>
13         
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 
17         and easy to 
18         create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
19         
20 </ul>
21         
22 ** Current Status
23
24 <ul>
25         <li>Compiles on Windows and Linux. Works on Linux. Still needs testing on Windows.</li>
26         
27         <li>The data provider is officially in beta. Still have missing features.</li>
28            
29 </ul>
30         
31 ** Action Plan
32
33 <ul>
34                 <li>GetSchemaTable implementation.</li>
35
36 </ul>
37
38 ** Testing
39 <br>
40 In order to test.
41 <ul>
42         <li>Have working mono and mcs setup</li>
43         
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>
47         
48         <li>Make sure the assembly IBM.Data.DB2.dll was built and installed 
49         where the other class libraries are installed.</li>
50         
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>
53         
54         <li>Here is a sample ConnectionString: 
55 <pre>
56  "server=sample;uid=myuserid;pwd=mypwd"
57 </pre>
58         </li>
59         
60                 
61         <li>C# Example:
62 <pre>
63  using System;
64  using System.Data;
65  using IBM.Data.DB2;
66  
67  public class Test 
68  {
69     public static void Main(string[] args)
70     {
71        string connectionString = 
72           "server=" + args[0] + ";UID=" + args[1] + ";PWD=" + args[2];
73        DB2Connection cn = new DB2Connection(connectionString);
74        cn.Open();
75        DB2Command cm = new DB2Command("SELECT * FROM schema.employees", cn);
76        DB2DataReader dr = cm.ExecuteReader();
77        while(dr.Read()){
78              Console.WriteLine("{0}:{1}:{2}", dr[0], dr[1], dr[2]);
79        }
80        cm.Dispose();
81        cn.Close();
82     }
83  }
84 </pre>
85         </li>
86         <li>Building C# Example:
87         <ul>
88                 <li>Save the example to a file, such as, DB2Test.cs</li>
89                 <li>Build on Linux:
90 <pre>
91         mcs DB2Test.cs -r System.Data.dll \
92             -r IBM.Data.DB2.dll
93 </pre>
94                 </li>
95                 <li>Build on Windows via Cygwin:
96 <pre>
97         mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
98              DB2Test.cs \
99              -lib:C:/cygwin/home/MyHome/mono/install/lib \
100              -r System.Data.dll -r IBM.Data.DB2.dll
101 </pre>
102                 </li>
103         </ul>
104         </li>
105         <li>Running the Example:
106 <pre>
107 mono TestExample.exe sample myuser mypasswd
108 </pre>
109         </li>
110                 
111 </ul>
112