Subject Re: [firebird-support] parametric queries from .NET
Author Helen Borrie
At 12:26 PM 25/07/2012, Newbie wrote:
>how to use parametric queries from .NET with Firebird?
>I have always been using parameters with stored procedures. like this
> FbCommand cmd = new FbCommand("select * from
>SP_myprocedure(?);");
> cmd.CommandType = CommandType.StoredProcedure;
> cmd.Parameters.Add("@myparameter", FbDbType.Text).Value =
>myparameter;
>
>this works very well. but now I have just a query where I need to add
>several parameter inputs. I have changed the CommandType to Text and
>tried adding parameter into query for example "select field1, field2
>from table1 where field1=:myparameter;"
>
>but can't get it to work. how should it be done?

More appropriate to ask about this on the firebird-net-provider list:

List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/firebird-net-provider>,
<mailto:firebird-net-provider-request@...?subject=subscribe>

^heLen^