Enforce Referencial Integrity by code 
Author Message
 Enforce Referencial Integrity by code

Hello friends.
Could someone tell me how is it possible to uncheck the Referencial
Integrity by code in a relationship between two tables, when we create a
database on the fly by code?
Thaks for reading this post


Sat, 20 Dec 2003 09:18:56 GMT  
 Enforce Referencial Integrity by code
The CREATE TABLE has an optional clause FOREIGN KEY to create foreign keys:

[ FOREIGN KEY ] REFERENCES ref_table [ ( ref_column ) ]
[ ON DELETE { CASCADE | NO ACTION } ]
[ ON UPDATE { CASCADE | NO ACTION } ]

Check the syntax of CREATE TABLE for your engine.
--
Best regards,

Carlos J. Quintero

MZ-Tools 2.0 freeware 'all-in-one' Add-In for VB6: Task List, Line
Numbering, TabIndex Assistant, Procedure Callers, Find and Replace in All
Projects, Close Windows, Review TabIndex and Collections, Add Procedure, Add
Error Handler, Add Procedure or Module Header, Clear Immediate Window,
Statistics, Copy/Paste/Rename/Remove controls with code, Default Controls
Properties and more:
www.mztools.com



Quote:
> Hello friends.
> Could someone tell me how is it possible to uncheck the Referencial
> Integrity by code in a relationship between two tables, when we create a
> database on the fly by code?
> Thaks for reading this post



Sat, 20 Dec 2003 15:44:24 GMT  
 Enforce Referencial Integrity by code
Dear friend.
I thank you very much for your usefull reply.
In case you would have a minute more for me, could you please be even more
specific?
(e.g. I uncheck the Cascade Updates option by the follwing:
FKEY.UpdateRule = adRINone  )
Is there any equivelant code for unchecking the Referencial Integrity option in
ADO?
(Like the rel.Attributes = dbRelationDontEnforce     'of  DAO)
In case you have no answer never mind. I thank you once again for your first
useful reply.

Best Regards
Akis

Quote:

> The CREATE TABLE has an optional clause FOREIGN KEY to create foreign keys:

> [ FOREIGN KEY ] REFERENCES ref_table [ ( ref_column ) ]
> [ ON DELETE { CASCADE | NO ACTION } ]
> [ ON UPDATE { CASCADE | NO ACTION } ]

> Check the syntax of CREATE TABLE for your engine.
> --
> Best regards,

> Carlos J. Quintero

> MZ-Tools 2.0 freeware 'all-in-one' Add-In for VB6: Task List, Line
> Numbering, TabIndex Assistant, Procedure Callers, Find and Replace in All
> Projects, Close Windows, Review TabIndex and Collections, Add Procedure, Add
> Error Handler, Add Procedure or Module Header, Clear Immediate Window,
> Statistics, Copy/Paste/Rename/Remove controls with code, Default Controls
> Properties and more:
> www.mztools.com



> > Hello friends.
> > Could someone tell me how is it possible to uncheck the Referencial
> > Integrity by code in a relationship between two tables, when we create a
> > database on the fly by code?
> > Thaks for reading this post



Sat, 20 Dec 2003 18:44:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Referencial Integrity

2. help me :referencial integrity tabel in visual basic 5

3. Changing Referencial Integrity on the fly

4. Enforce Referential Integrity

5. Problems Enforcing Referential Integrity using Autonumber field

6. Enforce referential integrity in a disconnected recordset?

7. Enforcing Referential Integrity

8. Create relationship without enforcing Referential Integrity

9. ADO Referential Integrity Error Code?

10. How to set off 'Enforce Referential Integrity' in MS-Access

11. SQL to Find Referencial Constraint Violations?

12. How to enforce autonew on Document1?

 

 
Powered by phpBB® Forum Software