2003-11-06 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / web / 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 create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
23         
24 </ul>
25
26 ** Current Status
27
28 <ul>  
29         <li>Current stable version: 1.0</li>
30         
31         <li>Current developement version: 1.5</li>
32         
33         <li>The new data provider/driver is written in C# and provides a high-performance native
34         implementation of the GDS32/API functions. This means that .Net developers
35         will be able to access Firebird databases without the need of Firebird
36         client install</li>
37  
38     <li>In support of the new module, a new mailing list
39         <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a> has 
40         been created. Please use this list for any 
41         questions that you may have about the provider</li>           
42 </ul>   
43
44 ** New features & enhancements in 1.5 version
45
46 <ul>
47         <li>Better fit to ADO.NET</li>
48         
49         <li>New GDS implementation</li>
50         
51         <li>Implicit transaction support</li>
52         
53         <li>Array datatype support</li>
54                         
55         <li>Firebird services API support</li>
56         
57         <li>Firebird events API support</li>
58                                 
59         <li>Stored procedure calls using Sql Server style</li>
60         
61         <li>Support for retrieve database schema information ( FbConnection.GetDbSchema )</li>
62                 
63         <li>Improved Commandbuilder implementation</li>
64 </ul>
65    
66 ** Testing
67
68 <ul>
69         
70         <li>Need a working mono and mcs</li>
71         
72         <li>Need access to a Firebird Relational Database or you can download
73         it from <a href="http://firebird.sourceforge.net">here</a></li>
74         
75         <li>Get the Firebird .NET data provider from here as 
76         <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>.  Make
77         sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
78         installed in the same place as the mono class libraries.</li>
79         
80         <li>Has a ConnectionString format:
81 <pre>
82  "Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
83 </pre>
84         
85         </li>
86         
87         <li>C# Example:
88         
89 <pre>
90  using System;
91  using System.Data;
92  using FirebirdSql.Data.Firebird;
93  
94  public class Test 
95  {
96     public static void Main(string[] args)
97     {
98         string connectionString = 
99                "Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
100                "User=SYSDBA;" +
101                "Password=masterkey;" +
102                "Dialect=3;" +
103                "Server=localhost";
104                
105        IDbConnection dbcon = new FbConnection(connectionString);
106        dbcon.Open();
107        IDbCommand dbcmd = dbcon.CreateCommand();
108        string sql = "SELECT * FROM employee";
109        dbcmd.CommandText = sql;
110        IDataReader reader = dbcmd.ExecuteReader();
111        while(reader.Read()) {
112             object dataValue = reader.GetValue(0);
113             string sValue = dataValue.ToString();
114             Console.WriteLine("Value: " + sValue);
115        }
116        // clean up
117        reader.Close();
118        reader = null;
119        dbcmd.Dispose();
120        dbcmd = null;
121        dbcon.Close();
122        dbcon = null;
123     }
124  }
125 </pre>
126         </li>
127         <li>Building C# Example:
128         <ul>
129                 <li>Save the example to a file, such as, TestExample.cs</li>
130                 <li>Build on Linux:
131 <pre>
132         mcs TestExample.cs -r System.Data.dll \
133             -r FirebirdSql.Data.Firebird.dll
134 </pre>
135                 </li>
136                 <li>Build on Windows via Cygwin:
137 <pre>
138         mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
139              TestExample.cs \
140              -lib:C:/cygwin/home/MyHome/mono/install/lib \
141              -r System.Data.dll -r FirebirdSql.Data.Firebird.dll
142 </pre>
143                 </li>
144         </ul>
145         </li>
146         <li>Running the Example:
147 <pre>
148 mono TestExample.exe
149 </pre>
150 </li>
151
152 </ul>
153