Delphi Examples: DbiGetVchkDesc

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetVchkDesc

Return to chapter overview

Obtain the first validity check descriptor for the specified cursor.

This example uses the following input:

 fDbiGetVchkDesc(hCur, VchkDesc);

 

The procedure is:

procedure fDbiGetVchkDesc(hCur: hDBICur; var VchkDes: VCHKDesc);

var

  CurProp: CURProps;

begin

  Check(DbiGetCursorProps(hCur, CurProp));

if (CurProp.iValChecks > 0) then begin

   Check(DbiGetVchkDesc(hCur, 1, @VchkDes));

   ShowMessage('Field #' + IntToStr(VchkDes.iFldNum) +

     ' has Validity Checks.');

end

else

   MessageDlg(' Validity Check Warning: No validity checks on this table.',

     mtError,[MBOK], 0);

end;