DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.

Using FbDataAdapter to Fill a Dataset

TEST.SQL Script (Testing Database)

Run the following script to create the testing database. It creates a simple table called MYTABLE with a single row. (How to create a database from an SQL script):

CREATE TABLE MYTABLE (
    ID   INTEGER,
    VAL  VARCHAR(20)
);
INSERT INTO MYTABLE (ID, VAL) VALUES (1, 'Test');

Reading values

You can fill an untyped DataSet using the following code:

CreateEmbeddedDb(database, "test.sql");

FbConnectionStringBuilder csb = new FbConnectionStringBuilder();
csb.ServerType = 1;
csb.Database = database;

DataSet ds = new DataSet();
FbDataAdapter da = new FbDataAdapter("SELECT * FROM mytable WHERE id >= @id", csb.ToString());
da.SelectCommand.Parameters.Add("@id", 1);
da.Fill(ds);