Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you modify a table in a client's machine?
Message
From
28/01/2002 08:31:11
Walter Meester
HoogkarspelNetherlands
 
 
To
28/01/2002 08:01:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00611234
Message ID:
00611461
Views:
30
Hilmar,

>You make my mouth water... OK, I'll put it on my to-do list immediately, so I don't forget it. Any limitations in the TaxRiBuilder? I think I remember somebody mentioned that it doesn't accept composite keys. That wouldn't be a problem for me; as you know, I use surrogate keys.

The following is in the ReadMe.txt:

The TaxRiBuilder is a referential integrity builder that is comaptible with the Microsoft standard RI builder. The following properties apply

- TaxRiBuilder, Generally is faster. When using _Rimode 1 (Fast) it is far faster.

- Produces compacter and more readable code, especially when de database contains many relations.

- You can adjust the RI code behaviour with the variables _RiMode and _DisableRi
_RiMode: Private or Public variable that exists in the scope of the Ricode.
This variable does not have to exist. The possible values are.

0 - None. In combination with _DisableRi, you can turn off RI for a given table.
This is especially handy to boost performance when you're sure the RI is fine.
1 - Fast. This leaves related tables open so that for a next call, the tables don't have to
opened again. Especiall handy for boosting commands that handles more than one record
like REPLACE FOR, APPEND FROM, DELETE FOR etc. Don't forget to close the related tables
with _RiCloseTables when you're done.
2 - Compatible (Default). Behaves more or less like the traditional RI builder.
3 - Strict. Places a file lock on all opened related tables to ensure that the read buffers are
Clean and others cannot change the contents of that table while the RI code is in
progress. This gives more secure results but can give concurrency problems when other
users places locks on that table.
4 - strict - fast. Conbination of 1 and 3.
+ 16. Forces a cascade update when a update restrict forbids the update.
+ 32. Forces a cascade delete when a delete restrict forbids the update.

_DisableRi Variable:
This variable is used in combination with _RiMode=0 and can be used to Ignore a INSERT, DELETE,
or UPDATE Ri rule for a given table. You can disable a trigger by filling this variable with
"Ins_"+Tablename to ignore the Insert trigger
"Del_"+Tablename , , , Delete ,
"Upd_"+Tablename , , , Update ,

- An additional DELETE rule is added: "Force blank". If a record is deleted and there are related child
records, the related foreign keys in the related records are blanked.

- An additional INSERT rule is added: "Allow blank". A record can be inserted (or updated) if the
foreign key contains a blank value; for any non-blank values the "restrict" rule applies.



Known issues:

- The TaxRiBuilder does not handle cascading updates and Force blanks (in event of a delete) when the primary key - foreignkey relation is based on an expression (of mutiple fields).

- Databases with a huge number of RI relations may cause the _HandleRi procedure to exceed the 64 Kb limit. You can mannually split up this procedure into several others, or revert to the standard RI builder.

- Though the TaxRiBuilder can automaticly transform the standard RI triggercode into TaxRiTriggers, when reverting to the standard Microsoft Ri builder, it thinks that the _HandleRi procedure is a custom procedure and does not automaticly replace it with the standard RI triggercode.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform