by TimStone » Thu Aug 17, 2017 3:07 am
Antonio,
Let me first state that this is ABSOLUTELY a problem with tDatabase ( database.prg ). I linked the 17.06 database.prg with my source code, and the FWH 17.07 libraries, and the problem I am tracking did not occur. With repeated testing, it still does not appear. However, with 17.07 database.prg ( in the library ), it happens every single time. So the ONLY variable here is the database.prg file ( tDatabase class )
Let me explain a bit of what is happening. I use tData as a class inheriting from tDatabase, and tRecord. I'm working with an invoice master file. Each record contains data ( often linked to other files ) with all of the information related to that invoice ( parts, labor, recommendations, revisions, totals, notes, client and service item, etc ).
The records are in a primary invoice file, and that list of open invoices is browsed. When one is selected to work on, it is opened at a tRecord object. Immediately all of the field data is stored into memory where it can be edited, and when finished, saved back to the main file.
With 17.06, I can browse the file, and select the desired invoice. I then open it as an individual record object and do all of my editing. When I go to exit it, the object is closed. I then select another record in the list and open it. When I close it, the same process takes place. My clients have been doing this all day long for years and never a problem.
Now we have 17.07. The first record works fine. However, after I close the first record and open the second, it initially appears that the data is there, but when I go to close it, the record object actually has nil values. I discovered this because a test is run before actually performing a save on the close. This is a critical error.
By linking in 17.06 database.prg, with absolutely no other change to the code, all works perfectly again.
My thought is that there is a problem with the buffers used in the new database.prg. I have looked at the code differences, and they are extensive. It appears that Nages is combining SQL and DBF code and that may be complicating the process too much.
I will have to write some test code, but it will not exactly be simple. I will try to do it in the next day or two. However, perhaps those who contributed to the many changes in that class could review them to see if there are obvious errors. My biggest concern is that other classes may depend on data from this one ( ie. xbrowse ) and soon my 17.06 version will not be sufficient to allow other elements of FWH to work properly.
Tim