Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this approach corrupt table?
Message
De
25/09/2012 16:52:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01553564
Message ID:
01553624
Vues:
56
Not really strange at all.. SYS() is a function, which returns a value -- so it it doesn't make sense to have it as a target of an assignment. In the cases where SYS() can be used to set a value, it's set by passing an additional parameter to the function.


>It's a little strange:
>
>sys(3052,1,.t.)
>sys(3052,2,.t.)
>
>
>>How do you set the SYS(3052),1) to TRUE? I tried the following:
>>
>>SYS(3052,1) = .T.
>>
>>but I get syntax error. What am I missing? Thank you.
>>
>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform