firebird 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. * Firebird and Interbase Data Provider
  2. <ul>
  3. <li>ADO.NET Data Provider for Firebird and Interbase databases</li>
  4. <li>Does not exist in Mono, but is a separate project</li>
  5. <li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
  6. is an independent project which uses source code based on the Interbase source code released
  7. by Borland under the Interbase Public License</li>
  8. <li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
  9. downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
  10. <li>The Firebird .NET Data provider has been made
  11. available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
  12. number of contributions to the OdbcJdbc code</li>
  13. <li>Bugs with Mono or the data provider should be reported
  14. in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
  15. do not have Bugzilla user account, it is free
  16. and easy to create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
  17. </ul>
  18. ** Current Status
  19. <ul>
  20. <li>Current stable version: 1.5.1</li>
  21. <li>Current developement version: 1.6</li>
  22. <li>The new data provider/driver is written in C# and provides a high-performance native
  23. implementation of the GDS32/API functions. This means that .Net developers
  24. will be able to access Firebird databases without the need of Firebird
  25. client install</li>
  26. <li>In support of the new module, a new mailing list
  27. <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a> has
  28. been created. Please use this list for any
  29. questions that you may have about the provider</li>
  30. </ul>
  31. ** New features & enhancements in 1.6 version
  32. <ul>
  33. <li>Firebird Embedded Server support.</li>
  34. <li>New FbScript class implementation.</li>
  35. <li>Improved connection pooling.</li>
  36. <li>Improved array datatype support.</li>
  37. </ul>
  38. ** Testing
  39. <ul>
  40. <li>Need a working mono and mcs</li>
  41. <li>Need access to a Firebird Relational Database or you can download
  42. it from <a href="http://firebird.sourceforge.net">here</a></li>
  43. <li>Get the Firebird .NET data provider from here as
  44. <a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>. Make
  45. sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
  46. installed in the same place as the mono class libraries.</li>
  47. <li>Has a ConnectionString format:
  48. <pre>
  49. "Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
  50. </pre>
  51. </li>
  52. <li>C# Example:
  53. <pre>
  54. using System;
  55. using System.Data;
  56. using FirebirdSql.Data.Firebird;
  57. public class Test
  58. {
  59. public static void Main(string[] args)
  60. {
  61. string connectionString =
  62. "Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
  63. "User=SYSDBA;" +
  64. "Password=masterkey;" +
  65. "Dialect=3;" +
  66. "Server=localhost";
  67. IDbConnection dbcon = new FbConnection(connectionString);
  68. dbcon.Open();
  69. IDbCommand dbcmd = dbcon.CreateCommand();
  70. string sql = "SELECT * FROM employee";
  71. dbcmd.CommandText = sql;
  72. IDataReader reader = dbcmd.ExecuteReader();
  73. while(reader.Read()) {
  74. object dataValue = reader.GetValue(0);
  75. string sValue = dataValue.ToString();
  76. Console.WriteLine("Value: " + sValue);
  77. }
  78. // clean up
  79. reader.Close();
  80. reader = null;
  81. dbcmd.Dispose();
  82. dbcmd = null;
  83. dbcon.Close();
  84. dbcon = null;
  85. }
  86. }
  87. </pre>
  88. </li>
  89. <li>Building C# Example:
  90. <ul>
  91. <li>Save the example to a file, such as, TestExample.cs</li>
  92. <li>Build on Linux:
  93. <pre>
  94. mcs TestExample.cs -r System.Data.dll \
  95. -r FirebirdSql.Data.Firebird.dll
  96. </pre>
  97. </li>
  98. <li>Build on Windows via Cygwin:
  99. <pre>
  100. mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
  101. TestExample.cs \
  102. -lib:C:/cygwin/home/MyHome/mono/install/lib \
  103. -r System.Data.dll -r FirebirdSql.Data.Firebird.dll
  104. </pre>
  105. </li>
  106. </ul>
  107. </li>
  108. <li>Running the Example:
  109. <pre>
  110. mono TestExample.exe
  111. </pre>
  112. </li>
  113. </ul>