Blobs in RAD Studio 2010 C++ Personality.

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
w0wbagger
Posts: 7
Joined: Wed 24 Aug 2005 20:23

Blobs in RAD Studio 2010 C++ Personality.

Post by w0wbagger » Tue 27 Jul 2010 01:04

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!

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 27 Jul 2010 09:04

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;

Post Reply