*** empty log message ***
[mono.git] / doc / firebird
1 * Firebird and Interbase Data Provider
2
3 <ul>
4         <li>ADO.NET Data Provider for Firebird and Interbase databases</li>
5
6         <li>Does not exist in Mono, but is a separate project</li>
7         
8         <li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is 
9         is an independent project which uses source code based on the Interbase source code released
10         by Borland under the Interbase Public License</li>
11         
12         <li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
13         downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
14         
15         <li>The Firebird .NET Data provider has been made
16     available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
17     number of contributions to the OdbcJdbc code</li>
18
19         <li>Bugs with Mono or the data provider should be reported 
20         in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>.  If you
21         do not have Bugzilla user account, it is free 
22         and easy to 
23         create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
24         
25 </ul>
26
27 ** Current Status
28
29 <ul>
30         <li>Currently, it is able to connect to Firebird and Interbase databases 
31            and execute commands</li>
32            
33         <li>The new data
34         provider/driver is written in C# and provides a high-performance native
35         implementation of the GDS32/API functions. This means that .Net developers
36         will be able to access Firebird databases without the need of Firebird
37         client install</li>
38  
39     <li>In support of the new module, a new mailing list
40         <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a> has 
41         been created. Please use this list for any 
42         questions that you may have about the provider</li>       
43     
44         <li>Stuff that works:
45                 <ul>\r
46                         <li>Currently implemented classes: \r
47                                         <ul>\r
48                                         <li>Connection and Connection Pooling</li> \r
49                                         <li>Command</li>\r
50                                         <li>Transaction</li>\r
51                                         <li>CommandBuilder</li>\r
52                                         <li>DataAdapter</li>\r
53                                         <li>DataReader</li>\r
54                                         <li>Error</li>\r
55                                         <li>ErrorCollection</li>\r
56                                         <li>Exception</li>\r
57                                         <li>Parameter</li>\r
58                                         <li>ParameterCollection</li>\r
59                                         <li>Transaction</li>\r
60                                         </ul>\r
61                         </li>           \r
62         </ul>
63         </li>
64  
65 </ul>   
66    
67 ** Action Plan
68
69 <ul>
70         <li>Bug fixing</li>\r
71         <li>Improving API reference documentation</li>\r
72         <li>Full testing with Firebird 1.5</li>\r
73         <li>Test with Mono ( http://www.go-mono.com )\r
74                 <ul>\r
75                         <li>Status  : Started</li>\r
76                 </ul>\r
77         </li>\r
78         \r
79         <li>Support for array datatype\r
80                 <ul>\r
81                 <li>Status  : Started</li>\r
82                 <li>Comments: See Interbase API reference documentation</li>\r
83                 <li>Add new file FbArray.cs for array fields management</li>\r
84                 </ul>\r
85         </li>\r
86 \r
87         <li>Support for Stored Procs calls that have returns values\r
88                 <ul>\r
89                 <li>Status  : Pending.</li>\r
90                 <li>Comments: Modify the isc_dsql_prepare method of GDS implementation for\r
91                         allow to return the output parameters.</li>\r
92                 </ul>\r
93         </li>\r
94         \r
95         <li>Implementation of FbClientPermission and FbClientPermissionAttribute\r
96                 <ul>\r
97                 <li>Status  : Pending</li>\r
98                 <li>Comments: See if these are really needed for Firebird</li>\r
99                 </ul>\r
100         </li>\r
101 \r
102         <li>Improve Logger implementation\r
103                 <ul>\r
104                         <li>Status: Pending</li>
105                 </ul>
106         </li>
107
108 </ul>   
109
110 ** Testing
111
112 <ul>
113         
114         <li>Need a working mono and mcs</li>
115         
116         <li>Need access to a Firebird Relational Database or you can download
117         it from <a href="http://firebird.sourceforge.net">here</a></li>
118         
119         <li>Get the Firebird .NET data provider from here as 
120         <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>.  Make
121         sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
122         installed in the same place as the mono class libraries.</li>
123         
124         <li>Has a ConnectionString format:
125 <pre>
126  "Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
127 </pre>
128         
129         </li>
130         
131         <li>C# Example:
132         
133 <pre>
134  using System;
135  using System.Data;
136  using FirebirdSql.Data.Firebird;
137  
138  public class Test 
139  {
140     public static void Main(string[] args)
141     {
142         string connectionString = \r
143                "Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +\r
144                "User=SYSDBA;" +\r
145                "Password=masterkey;" +\r
146                "Dialect=3;" +\r
147                "Server=localhost";\r
148        IDbConnection dbcon = new FbConnection(connectionString);
149        dbcon.Open();
150        IDbCommand dbcmd = dbcon.CreateCommand();
151        string sql = "SELECT * FROM employee";
152        dbcmd.CommandText = sql;
153        IDataReader reader = dbcmd.ExecuteReader();
154        while(reader.Read()) {
155             object dataValue = myReader.GetValue(0);
156             string sValue = dataValue.ToString();
157             Console.WriteLine("Value: " + sValue);
158        }
159        // clean up
160        reader.Close();
161        reader = null;
162        dbcmd.Dispose();
163        dbcmd = null;
164        dbcon.Close();
165        dbcon = null;
166     }
167  }
168 </pre>
169         </li>
170         <li>Building C# Example:
171         <ul>
172                 <li>Save the example to a file, such as, TestExample.cs</li>
173                 <li>Build on Linux:
174 <pre>
175         mcs TestExample.cs -r System.Data.dll \
176             -r FirebirdSql.Data.Firebird.dll
177 </pre>
178                 </li>
179                 <li>Build on Windows via Cygwin:
180 <pre>
181         mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
182              TestExample.cs \
183              -lib:C:/cygwin/home/MyHome/mono/install/lib \
184              -r System.Data.dll -r FirebirdSql.Data.Firebird.dll
185 </pre>
186                 </li>
187         </ul>
188         </li>
189         <li>Running the Example:
190 <pre>
191 mono TestExample.exe
192 </pre>
193 </li>
194
195 </ul>
196