Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this approach corrupt table?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01553564
Message ID:
01553568
Vues:
71
Thank you very much for your input. I have not used the SYS(3052,1) and SYS(3052,2) so they must be whatever is default. But I will set them to TRUE if you think that it improves something. My issue (and I am guessing) is that the same form (not two or more users) have the same table used in multiple BIZ classes. Somehow I think I should have used a different approach. This is what I am thinking now.

>This may be way off the mark, but is a BEST PRACTICE for multiuser applications.
>
>What are your settings for the following SYS commands?
>
>SYS(3052,1)
>SYS(3052,2)
>
>The FoxPro defaults are not exactly wrong, but are "backward compatible" and useless.
>
>These should both be set to TRUE in any multiuser application.
>
>See the following in VFP Help:
>
>SYS(3052) - Override SET REPROCESS Locking
>
>
>>Hi,
>>
>>Lately a few customers reported to me table corruption with one specific table. Which made me think of possibly flawed design I implemented. Here is the description of the design - in general terms.
>>
>>I have a BIZ base class that is used for pretty much all tables of the application. For example, a form can instantiate any number of the BIZ classes based on this class, depending on the tables used (e.g. Vendors, Staff, Parts, etc.). In the INIT method of the base BIZ class a BIZ class to an audit table is instantiated (using the same base class). Therefore, each BIZ class has a reference (class property) to a BIZ class of this audit table. All BIZ classes use CursorAdapter to connect to the base tables. And therefore at any given time there could be a number of BIZ classes "pointing" to the same physical table (audit table). This audit table is the one that gets corrupted. Could this approach cause the corruption? I am thinking of redesigning the base BIZ class and NOT to instantiate the Audit Table BIZ class but rather do just one BIZ class for the entire data session. But before I go through tons of work of rewriting this, I would like to hear your input.
>>
>>TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform