summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/packages/fcl-db/tdb5.pp
blob: af81584687fe6a741d5e51fc0ab64f13bf6d15cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
program LookupIsNull;

uses db, memds, variants;

var
  DSet:TMemDataset;
  tmpVariant:Variant;

begin
  DSet:=TMemDataset.Create(nil);
  DSet.FieldDefs.Add('NAME',ftString,20);
  DSet.CreateTable;
  DSet.Open;

  tmpVariant:=DSet.Lookup('NAME','aaaa','NAME');
  if not (VarIsNull(tmpVariant)) then
    Halt(1);
  DSet.Close;
  DSet.Free;
end.