|
<< Click to Display Table of Contents >> Delphi Examples: DbiGetIndexDesc |
![]() ![]()
|
Get the properties of a specific index associated with a cursor:
This function returns the IDXDesc properties specified by the IndexName parameter of TTable T's index.
function GetIndexDesc(T: TTable; IndexName: String): IDXDesc;
var
hNewCur: hDbiCur;
iIndexId: LongInt;
InfoStr: String;
pInfoStr: array[0..100] of char;
begin
Check(DbiCloneCursor(T.Handle, False, False, hNewCur));
try
iIndexId := 1;
Check(DbiSwitchToIndex(hNewCur, PChar(IndexName), nil, iIndexId, False));
Check(DbiGetIndexDesc(hNewCur, 0, Result)); //'0' specifies the active index
finally
Check(DbiCloseCursor(hNewCur));
end;
end;