如果你用的是SQL-SERVER的话,可以从系统表中得出
解决方案 »
- 如何用TidFTP判断服务器上有文件,有文件就下载!
- 有关access数据库的备份和还原问题?
- 请问调用那个windows自己弹出对话框的API是什么啊?
- 求助 在应用程序中如何感知用户输入法的切换
- MAPX控件如何与D6 的CLIENTDATASET 相连接,谢谢!
- 如何用http1.1的可持续连接调用asp网页?
- 请问一下Locate('姓名',‘王’,[loCaseInsensitive])中的[loCaseInsensitive]参数什么意思并且还有什么参数在哪可以有明细的说明
- 请各位帮忙!!!如何在一个image中识别一个不规则物体并计算它的面积,解决后定高分相送(500-1000)!急,急!
- 如何删除文本文件中的一条记录!(再线等!)
- 如何获得程序的路径!还有在没有装delphi的机上运行数据库软件,要在叫上哪写文件?
- 如何获得数据集中数据表的某个字段类型?
- 为了得到当前使用的数据表名称,想通过一个全局变量FmType的值判别后传递进来
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 OtherTable := Format('%s, %d', [OtherTable, Result.aiOthTabFld[B]])
else
OtherTable := IntToStr(Result.aiOthTabFld[B]);
end
else
Break;
end;
Add('FIELDS OTHER=' + OtherTable);
end;
end;
end;