Page 1 of 1

Blobs in RAD Studio 2010 C++ Personality.

Posted: Tue 27 Jul 2010 01:04
by w0wbagger
Am now using TVirtualTable for my other problem. Thank you for the quick response!

However, as I migrate to RAD Studio 2010, I'm finding lots of stuff that is breaking. I used to be able to assign data to Blobs using something like:

TMyQuery->Params->ParamByName("Blob")->AsBlob = NewBlob->AsString.

This is no longer working - I'm assuming because of more stringent language requirements. Do I *have* to assign this now using Streams?

For some reason it refuses to see the AsBlob as a TBlob, but instead calls it a TByteDynArray, and doesn't seem to be able to do conversions. Has anyone else had this problem? Is there a new, accepted way to assign a Blob parameter from another Blob?

Thanks - I'm almost migrated!

Posted: Tue 27 Jul 2010 09:04
by Dimon
Use the TDAParam.AsBlobRef property to set the value of the BLOB parameter as a TBlob object. Setting AsBlobRef will set the DataType property to ftBlob.

Code: Select all

MyQuery->Params->ParamByName("Blob")->AsBlobRef = NewBlob;