且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在FirebirdSql中正确使用参数

更新时间:2023-02-17 20:00:27

您的第一个查询需要 SELECT cast(@AN_INT as int)FROM RDB $ DATABASE 。 Else Firebird不知道参数类型是什么(即使它是在C#代码中指定的)。

Your first query needs to be SELECT cast(@AN_INT as int) FROM RDB$DATABASE. Else Firebird doesn't know what the parameter type is (even if it's specified in C# code).

您可以尝试直接在Firebird中运行这段代码发动机本身的限制。

You can try to run this piece of code directly in Firebird to see the limitation of engine itself.

execute block
as
begin
    execute statement ('select :foobar from rdb$database')(foobar := 10);
end