Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi for PHP/Library    [ Add a report in this area ]  
Report #:  113956   Status: Open
DBDataset Recordcount not reset when reopening
Project:  HTML5 Builder Build #:  5.0.961.870
Version:    5.0 Submitted By:   Kevin Day
Report Type:  Basic functionality failure Date Reported:  3/19/2013 8:48:56 PM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2013 12:24:09 AM
Platform:    All platforms Internal Tracking #:   5002
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
The record count on a table doesn't change even though filters have been applied.
Steps to Reproduce:
have a table and database on the form. Following steps in code:
1. Call table->open().  
2. Retrieve the record count
3. call table->close();
4. set a filter on the table
5. call Table-open();
6. retrieve Record count again and it is the same as before but it should be different.
The RecordCount count funtion performs a query to get the record count only if the Dataset::_recordcount variable is 0 and then after the query is executed, sets the Dataset::_recordcount variable to the value retrieved.  The problem is the Dataset::_recordcount variable is never reset.

So to fix I have added in my code to DBDataset::InternalOpen():

$this->_recordcount = 0;


Server Response from: ETNACODE01