Defining/Binding Blob Values

Thomas.DellAnno at swisstopo.ch Thomas.DellAnno at swisstopo.ch
Tue Aug 19 06:43:15 CDT 2008


Many thanks for your support.

After a lot of try and error and having a look over the examples you have
sent to me, I finally found a solution that works:

--------- begin C++ snippet ----------------------------------------

//	... valentina init ... 

	ArrayOfValues_Ptr pBinds = new ArrayOfValues();

	String value = "This is the blob data";
	int len = value.length();

	I_Value_Ptr valBlob = CreateValueVarBinary (true, &len, value);
	I_ValueBinary_Ptr pBlob = fbl_dynamic_cast<I_ValueBinary>(valBlob);
	pBlob->put_Data ((uchar*)value, len);
	pBinds->AddItem (valBlob);

// ... query execution

--------- end C++ snippet ----------------------------------------

Using the Function "CreateValueVarBinary()" instead of "CreateValue()" does
the job.

Best regards -- Tom


More information about the Valentina mailing list