TBetterADODataset 3.04, default field values and boolean field

Hi Vassil,

D5, Windows NT, MDAC 2.5, TBetterADODataset v3.04

It seems that, when inserting/posting new records, default
field values are set to null if TBetterADODataset is used
(unlike Borland's TADODataset).

Moreover, if field type is boolean and no value is explicitly
specified, then an OLEDB exception is raised.

I have implemented the following example:

1. Create table with fields containing default values:

  with TADOCommand.Create(nil) do
  begin
    Connection:= ADOConnection1;
    CommandText:= 'CREATE TABLE tbAnyTable(' +
                  '  ACode          INT,' +
                  '  ANumber        INT DEFAULT 5,' +
                  '  ABoolean       BIT DEFAULT FALSE)';
    Execute;

  end;

2.Insert new records:

  BetterADODataset1.Insert;
  BetterADODataset1.FieldByName('ACode'):= 1;
  BetterADODataset1.FieldByName('ABoolean'):= False;
  BetterADODataset1.Post; //  <- Here, 'ANumber' field is set
                          //     to null instead of 5

  BetterADODataset1.Insert;
  BetterADODataset1.FieldByName('ACode'):= 2;
  BetterADODataset1.Post;  //  <- Here an OLEDB exception
                           //     is raised

In oder to solve these problems, I have replaced 'VarIsEmpty'
(line 743) by 'VarIsNull', i.e.:
Line 743:       //  If Not VarIsEmpty(Data) Then
                    If Not VarIsNull(Data) Then

Is this correct?

Thanks in advance,

Mikel Larreategi