DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.
Thursday, March 30, 2006

Data Application Block for Firebird SQL (The Code Project)

The Firebird SQL data application block is intended to speed up development, and it should be used in conjunction with data layer classes in much the same way as Microsoft’s data block. The sample included with this article uses the embedded Firebird SQL database (included in sample) to demonstrate the use of the application block without having to bother setting up a database.

Firebird SQL data application block was inspired by the Microsoft Application blocks. The block provides overloaded methods to query a Firebird database which return a dataset, data table, or integer in the case of scalar database calls. An additional overload method takes an existing dataset as a parameter and fills the results of a stored procedure send as parameter as well.

Data Application Block for Firebird SQL - The Code Project - C# Database


Wednesday, March 29, 2006

How to Add Firebird .NET Provider 2.0 to Visual Studio 2005

Jiri Cincura has provided a step-by-step guide to VS.NET 2005 support installation. You can read the article on his blog: DDEX and Firebird .NET Data Provider.

Tuesday, March 21, 2006

Calling Stored Procedures from Stored Procedures

Proper handling of the return values when calling a stored procedure from another stored procedure can be tricky. Here is the overview of the syntax.

Syntax Overview

1. No return values:

EXECUTE PROCEDURE procedure_name (parameter, parameter,...);

2. Single row returned (there is no SUSPEND in the called procedure):

EXECUTE PROCEDURE procedure_name (parameter, parameter,...) RETURING_VALUES :variable1, :variable2;

3. Result set returned from a selectable stored procedure (the called procedure uses SUSPEND; no matter how many rows actually returned):

FOR SELECT col1, col2 FROM procedure_name (parameter, parametere, ...) INTO :variable1, :variable2 DO
BEGIN
  -- your code for processing the result set
END

Common Firebird Error: Multiple Rows in Singleton Select

Possible causes:

  • Your are calling EXECUTE PROCEDURE statement and the stored procedure returns multiple rows (EXECUTE PROCEDURE expects just a single row).
  • You are calling SELECT ... INTO statement in your stored procedure and the selection returns multiple rows. If multiple rows are expected, you have to use FOR SELECT ... DO statement.

Previous

Archives