ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查询ADO连接数据库中所有表

查询ADO连接数据库中所有表

Linux操作系统 作者:niuchao 时间:2019-06-29 11:39:04 0 删除 编辑
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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2004-11-04

  • 博文量
    141
  • 访问量
    136184