Tax RiBuilder.

This builder is still in beta.

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.


Setup.

Just start the TaxRiSetup to register this builder. When registered, and choosing for the Referential Integrity builder, you can choose between the regular of TaxRiBuilder.


Reporting Problems.

All issues can be reported at Tax@Tref.nl


Legal Notice.

This product is shareware. You may use it for your personal products. However, you may not include it into commercial products (like frameworks) without the written permission of VOF Tax Software.
VOF Tax Software is not responsible for any damage that is caused by the use of this builder.

Walter Meester,
VOF Tax Software
Tax@Tref.nl