|
<< Click to Display Table of Contents >> Delphi Examples: DbiGetCursorForTable |
![]() ![]()
|
Return an existing cursor for the given table within the current session.
This function also returns the name of the index on which the table is open. This example uses the following input:
OutputStr:= fDbiGetCursorForTable(Table1.DBHandle, Table1.TableName, MyNewCursor);
The function is defined as:
function fDbiGetCursorForTable(hTmpDb: hDbiDb; TblName: string; var hNewCur: hDBICur): string;
var
IndexDesc: IdxDesc;
begin
Check(DbiGetCursorForTable(hTmpDb, PChar(TblName), '', hNewCur));
Check(DbiGetIndexDesc(hNewCur, 0, IndexDesc));
Result := StrPas(IndexDesc.szName);
end;