具体请参阅BDE的帮助
The function is:
fDbiGetRIntDesc(OrdersTbl, 1, MyList);
function fDbiGetRIntDesc(Table: TTable; SeqNo: Word; RIntList: TStringList): RINTDesc;
var
ThisTable, OtherTable: string;
Props: CURProps;
B: Byte;
begin
ThisTable := '';
OtherTable := '';
FillChar(Result, sizeof(Result), #0);
Check(DbiGetCursorProps(Table.Handle, Props));
if (Props.iRefIntChecks = 0) then
raise EDatabaseError.Create('There are no referential integrity checks on this table');
Check(DbiGetRIntDesc(Table.Handle, SeqNo, @Result));
if (RIntList <> nil) then begin
with RIntList do begin
Add(Format('NUMBER=%d', [Result.iRintNum]));
Add(Format('NAME=%s', [Result.szRintName]));
case Result.eType of
rintMASTER: Add('TYPE=MASTER');
rintDEPENDENT: Add('TYPE=DEPENDENT');
else
Add('TYPE=UNKNOWN');
end;
Add(Format('OTHER TABLE=%s', [Result.szTblName]));
case Result.eModOp of
rintRESTRICT: Add('MODIFY=RESTRICT');
rintCASCADE: Add('MODIFY=CASCADE');
else
Add('MODIFY=UNKNOWN');
end;
case Result.eDelOp of
rintRESTRICT: Add('DELETE=RESTRICT');
rintCASCADE: Add('DELETE=CASCADE');
else
Add('DELETE=UNKNOWN');
end;
Add(Format('FIELD COUNT=%d', [Result.iFldCount]));
for B := 0 to DBIMAXFLDSINKEY do begin
if (Result.aiThisTabFld[B] <> 0) then begin
if (B <> 0) then
ThisTable := Format('%s, %d', [ThisTable, Result.aiThisTabFld[B]])
else
ThisTable := IntToStr(Result.aiThisTabFld[B]);
end
else
Break;
end;
Add('FIELDS=' + ThisTable);
for B := 0 to DBIMAXFLDSINKEY do begin
if (Result.aiOthTabFld[B] <> 0) then begin
if (B <> 0) then