function IsTableExists(Conn: TADOConnection;TableName: string): boolean;
var
sUper: string;
SL: TStringList;
i: integer;
begin
sUper := UpperCase(TableName);
SL := TStringList.Create;
Result := false;
try
Conn.GetTableNames(SL,false);
for i:= 0 to SL.Count -1do
begin
if UpperCase(SL) = sUper then
begin
Result := true;
break;
end;
end;
finally
SL.Free;
end;
end;