Skip to content
Permalink
Browse files

Try to fix missing schema in row counting query. See https://www.heid…

  • Loading branch information...
ansgarbecker committed Aug 13, 2019
1 parent ea4fd3a commit f4d2488998ba585c971e672545b8a2843378572b
Showing with 1 addition and 4 deletions.
  1. +1 −4 source/dbconnection.pas
@@ -4219,10 +4219,7 @@ function TAdoDBConnection.GetRowCount(Obj: TDBObject): Int64;
' AND '+QuoteIdent('object_id')+' = object_id('+EscapeString(Obj.Database+'.'+Obj.Schema+'.'+Obj.Name)+')'
);
end else begin
if not Obj.Schema.IsEmpty then
Rows := GetVar('SELECT COUNT(*) FROM '+QuoteIdent(Obj.Schema)+'.'+QuoteIdent(Obj.Name))
else
Rows := GetVar('SELECT COUNT(*) FROM '+QuoteIdent(Obj.Database)+'.'+QuoteIdent(Obj.Name))
Rows := GetVar('SELECT COUNT(*) FROM '+Obj.QuotedDbAndTableName);
end;
Result := MakeInt(Rows);
end;

0 comments on commit f4d2488

Please sign in to comment.
You can’t perform that action at this time.