FirebirdSQL / NETProvider

Firebird ADO.NET Data Provider
https://www.firebirdsql.org/en/net-provider/
Other
152 stars 62 forks source link

Firebird 5.0 #1159

Closed andvl-mail-ru closed 4 months ago

andvl-mail-ru commented 4 months ago

Hi.

After i update my Server From Firebird 4 to Firebird 5.0 output parameters of FbCommand no longer return values (SERVER return values):

CommandText = "insert into demo values (@id, 'FooBar') returning "; = OK CommandText = "update or insert into demo values (@id, 'FooBar') returning "; = EMPTY

Short sample code:

using (var connection = new FbConnection("database=localhost:demo;user=sysdba;password=masterkey")) { connection.Open();

using (var command = connection.CreateCommand())
{
    command.CommandText = "update or insert into demo values (@id, 'FooBar') returning * ";

    var pID = command.CreateParameter();
    pID.ParameterName = "@id";
    pID.FbDbType = FbDbType.Integer;
    pID.Direction = System.Data.ParameterDirection.InputOutput;

    command.Parameters.Add(pID);

    var res = command.ExecuteNonQuery();

    Debug.Print(pID.Value?.ToString());

}

};

cincuranet commented 4 months ago

That's described and documented behavior.