Try something like this: "SELECT * from rdb$database where CAST(@n0 AS VARCHAR(10)) is null"
On Thu, Aug 26, 2010 at 8:04 PM, Matej Golob <ma...@pohorje.net> wrote: > I have problem when I use parameters and compare parameter value with null. > I've create simple snipet code, which represents problem: > > > > FbCommand com = connection.CreateCommand; > com.CommandText = "select * from rdb$database wher...@n0 is null";; > FbParameter par = new FbParameter("n0", FbDbType.VarChar); > par.Value = "a"; > com.Parameters.Add(par); > var reader = com.ExecuteReader(); > > > > No mather what value is, If I execute this I get error: Invalid data type. > > If I do »same« with literals (»SELECT * from rdb$database where 'a' > is null«) of course everything works fine, so I assume there should be > problem in provider. > > > > Thanks for help. > > > > Matej > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > -- Gareth ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider