how to get data and length from raw and long raw fields

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mch
Posts: 1
Joined: Thu 07 Jan 2010 11:29

how to get data and length from raw and long raw fields

Post by mch » Thu 07 Jan 2010 11:38

I am trying to get binary data from a raw field using "getBinary()" method that returna an unsigned char* that is exactly what I need , but the problem is that I dont know how to get the size of returned data.

I will appreciate if someone can help with this.

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

Post by Dimon » Fri 08 Jan 2010 08:39

To solve this problem you should use the TBlob.Size property, like this:

Code: Select all

Blob := MyQuery1.GetBlob(Field);
Size := Blob.Size;

Post Reply