Empty blob field

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jota
Posts: 34
Joined: Tue 22 Nov 2011 19:21

Empty blob field

Post by jota » Fri 23 Jan 2015 11:01

Hi

How i can define an empty blob field in TUniTable.InsertRecord([Key, blobfield]);

Thanks in advance

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Empty blob field

Post by AlexP » Mon 26 Jan 2015 09:02

Hello,

To insert NULL to a Blob field, you can use the following code:

Code: Select all

  UniTable1.Open;
  UniTable1.InsertRecord([1, null]); 
// or UniTable1.InsertRecord([1]); 
// or UniTable1.InsertRecord([1, nil]);
  If UniTable1.Fields[1].IsBlob then
    if UniTable1.Fields[1].IsNull then
      ShowMessage('Field is Null');

Post Reply