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