Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically change persistent relation settings
Message
From
21/02/2004 02:18:24
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
21/02/2004 00:55:35
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00879555
Message ID:
00879566
Views:
19
Request adding the capability to programmatically add or alter the Referentical Integrity settings on persistent relationships. For example, if I want to change the RI Delete setting from none to cascade, the only way I can do it now it through the RI builder. Please see the suggested command mods below...

CREATE TABLE | DBF TableName1 [NAME LongTableName] [FREE]
( FieldName1 FieldType [( nFieldWidth [, nPrecision] )] [NULL | NOT NULL]
[CHECK lExpression1 [ERROR cMessageText1]]
[AUTOINC [NEXTVALUE NextValue [STEP StepValue]]] [DEFAULT eExpression1]
[PRIMARY KEY | UNIQUE [COLLATE cCollateSequence]]
[REFERENCES TableName2 [TAG TagName1]] [NOCPTRANS]
[, FieldName2 ... ]
[, PRIMARY KEY eExpression2 TAG TagName2 |, UNIQUE eExpression3 TAG TagName3
[COLLATE cCollateSequence]]
[, FOREIGN KEY eExpression4 TAG TagName4 [NODUP]
[ON INSERT [RESTRICT|IGNORE]]
[ON UPDATE [CASCADE|RESTRICT|IGNORE]]
[ON DELETE [CASCADE|RESTRICT|IGNORE]]
[COLLATE cCollateSequence]
REFERENCES TableName3 [TAG TagName5]] [, CHECK lExpression2 [ERROR cMessageText2]] )
| FROM ARRAY ArrayName

ALTER TABLE TableName1 [DROP [COLUMN] FieldName3]
[SET CHECK lExpression3 [ERRORcMessageText3]] [DROP CHECK]
[ADD PRIMARY KEY eExpression3 [FOR lExpression4] TAG TagName2
[COLLATE cCollateSequence]] [DROP PRIMARY KEY]
[ADD UNIQUE eExpression4 [[FOR lExpression5] TAG TagName3
[COLLATE cCollateSequence]]] [DROP UNIQUE TAG TagName4]
[ADD FOREIGN KEY [eExpression5] [FOR lExpression6] TAG TagName4
[COLLATE cCollateSequence] REFERENCES TableName2 [TAG TagName5]
[ON INSERT [RESTRICT|IGNORE]]
[ON UPDATE [CASCADE|RESTRICT|IGNORE]]
[ON DELETE [CASCADE|RESTRICT|IGNORE]]]
[ALTER FOREIGN KEY TAG TagName4 ON [INSERT [RESTRICT|IGNORE]]|[UPDATE|DELETE][CASCADE|RESTRICT|IGNORE]]
[DROP FOREIGN KEY TAG TagName6 [SAVE]] [RENAME COLUMN FieldName4 TO FieldName5] [NOVALIDATE]
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform