|
<< Click to Display Table of Contents >> Delphi Examples: DbiGetCursorProps |
![]() ![]()
|
Example 1: Return the size of the record buffer needed to hold information for one record.
Note: Delphi programs should use TTable.RecordSize.
This example uses the following input:
RecBuf := AllocMem(fDbiGetCursorProps1(Table1.Handle));
The function is defined as:
function fDbiGetCursorProps1(hTmpCur: hDbiCur): Word;
var
Prop : CURProps;
begin
Check(DbiGetCursorProps(hTmpCur, Prop));
Result := Prop.iRecBufSize;
end;
Example 2: Return information about the table open on the specified cursor.
This example uses the following input:
fDbiGetCursorProps2(Table1.Handle, TmpList);
The procedure is defined as:
procedure fDbiGetCursorProps2(hTmpCur: hDbiCur; CurList: TStringList);
var
Prop : CURProps;
begin
Check(DbiGetCursorProps(hTmpCur, Prop));
with CurList do begin
Add('Table Name: ' + Prop.szName);
Add('Table Type: ' + Prop.szTableType);
Add('Fields: ' + IntToStr(Prop.iFields));
Add('Record Buffer Size: ' + IntToStr(Prop.iRecBufSize));
Add('Indexes: ' + IntToStr(Prop.iIndexes));
Add('Validity Checks: ' + IntToStr(Prop.iValChecks));
Add('Referential Integ Checks: ' + IntToStr(Prop.iRefIntChecks));
Add('Table Level: ' + IntToStr(Prop.iTblLevel));
Add('Language Driver: ' + Prop.szLangDriver);
end;
end;