When I run a query in Delphi, I need to know how many rows are affected, i.e. returned, from the query. The rowseffected propery always returns a -1 and it shouldn't.
From the Borland docs on TQuery (which PvQuery inherits from):
Inspect RowsAffected to determine how many rows were updated or deleted by the last query operation. If no rows were updated or deleted, RowsAffected has a value of zero. RowsAffected will have a value of –1 if the execution of the SQL statement could not be executed due to an error condition. This latter situation would typically follow the raising of an exception.
Unless you're doing an insert, update, or delete query, I would expect this value to be useless.
After the SQL.Exec is given, you can't get a record count, pervasive tells me you can't do that on a closed dataset. Not being used to pervasive's flavor or sql, I find a lot of gotcha's with this stuff.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.