General information
Category:
Reports & Report designer
Ken,
Why do you feel you need to lock the whole table to delete and append? You would only need to lock and delete the one record. There should not be any need to lock when you are appending records.
Also, you could replace APPEND + REPLACE with INSERT INTO, but does the same thing. I believe these lock the table header very briefly but with SET REPROCESS TO AUTOMATIC your users should barely notice.
There is very little chance of user conflict in my apps so I take the optimistic route and let FoxPro handle it.
If you USE the non-data table (USE MyReport.frx) you should be able to use IF FLOCK() or IF RLOCK() just as you do with any other table.
As a side note, when I first began thinking of reports, forms, etc. as just more tables, it was an eye-opening experience!
>The update routine will attempt to lock the table (loops until successful).
> Once locked:
> It deletes original record. (yes it does generate quite a bit of deleted records, but great for restoring a previous record).
> It will then append blank
> Then replace fields with the data from the cursors.
>Then I close the table.
>
>The cust_curs is then selected and the report run.
>
>
>>If it's the report, the advice to copy it to your temp folder is a good idea.
>
>I've been thinking about doing this also (plus those static tables that are referenced quite a bit).
>
>I do have another question: Is it possible to lock a non-database file, and detect that lock with Foxpro?
>
>Thanks.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only