I have a question about handling NULL in XSQLVAR:

Is it required to have sqldata set to null, or is setting sqlind to -1 
sufficient? The reason I am asking is 
http://tracker.firebirdsql.org/browse/JDBC-271.

When doing "SELECT cast(? as varchar(1)) FROM rdb$database" with the 
parameter set to NULL with sqldata being non-null and sqlind = -1, the 
query will return an empty string.

If on the other hand you do
INSERT INTO single_varchar (varcharcolumn) VALUES (?)
with the same parameter data, followed by:
SELECT varcharcolumn FROM single_varchar

you will get NULL back.

Is Jaybird doing it wrong and/or is this a bug with parameter handling 
in Firebird when the parameter is part of the select fields?

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to