Discussion:
[Firebird-odbc-devel] Blob field is null when passing empty string parameter
Jaromír Karmazín
2015-07-10 19:35:39 UTC
Permalink
Hello,

I'm faced with a following problem:
I have a table MyTable with a BLOB SUB_TYPE 1 column MyBlob.
Insert or update statement with value works well: INSERT INTO MyTable
(MyBlob) VALUES ('') /* results to an empty string in MyBlob field */
Passing an empty string as parameter causes the problem: INSERT INTO
MyTable (MyBlob) VALUES (?pcMyString) /* MyBlob field is null when
pcMyString==''*/
If pcMyString is not empty the previous SQL statement works well and
MyBlob field contains string from pcMyString parameter.

Similar SQL statement with char or varchar field is ok for both passing
value and passing parameter. The problem is with BLOB field only.
Something seems to be wrong with parameter binding. Is there a way how
to get rid of this annoying thing?

My environment is Win7 64bit, Firebird_ODBC_2.0.3.154_Win32 (yes,
32-bit because of 32-bit application), Visual Foxpro 7.0 SP1. I've
already discussed the problem in the Czech Visual Foxpro developers
forum. Other members have proved the problem.

Thank you for your help.

MirekK

Loading...