|
<< Click to Display Table of Contents >> Delphi Examples: DbiExtractKey |
![]() ![]()
|
Extract the key value for the current record.
This example assumes the field is of type character and uses the following input:
fDbiExtractKey(Table1.Handle, KeyValue);
The procedure is defined as:
procedure fDbiExtractKey(hTmpCur: hDBICur; var KeyBuff: string);
var
P: PChar;
Props: CurProps;
begin
Check(DbiGetCursorProps(hTmpCur,Props));
GetMem(P, Props.IkeySize);
Check(DbiExtractKey(hTmpCur, nil, P));
KeyBuff:= StrPas(P);
FreeMem(p, Props.IkeySize);
end;