function TableExist(pConn:TADOConnection; pcTable: string):boolean;
var tmpFldList: TStrings ;
nLoop: integer ;
begin
Result := False ;
tmpFldList := TStringList.Create ;
pConn.GetTableNames( tmpFldList, True ); // 包含系统表
for nLoop := 0 to tmpFldList.Count - 1 do
begin
if uppercase( tmpFldList[nLoop] ) = uppercase( pcTable ) then
begin
Result := True ;
break ;
end;
end;
tmpFldList.Free ;
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/166523/viewspace-1063808/
,如需转载,请注明出处,否则将追究法律责任。