Blob field is null when passing empty string parameter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Blob field is null when passing empty string parameter

Jaromír Karmazín
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




------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel