Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get foreign keys
Message
From
11/06/2022 08:51:52
 
 
To
08/06/2022 06:01:10
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01684430
Message ID:
01684489
Views:
31
Hi Lutz,

I was ONLY speaking to RI-Trigger code - the Cascade, Restict & Ingnore stuff.
First vfp implementations were buggy and ugly.
Replaced all that with the Booth/Sawyer code as soon as available
(got early access via Rainer) and have ot looked back since.

Have not checked how xCase implements it, as I was not responsible when larger project used it
but I never went back to setting the dbc RI manually.

On VisualExtend: most vfp frameworks were ported form Foxpro Dos/Win implementations.
Yes, it often shows in style of approach and programming - but Extend is still in the top 3 IMO.
VisaulExpress, MaxFrame and VisualExtend duke for first 3 places,
Promatrix gets in the fight if you use xCase and Hanks integration into Ptomatrix.

With VisualExtend you probably have the broadest spectrum,
but base working mind set is very old Foxpro with generators and wizards.

OTOH it probably is the easiest fwk to replace certain aspects only
From start on it had lot of template/hook patterns (when eventbinding was unheard of) -
but overwriting at higher level meant to always rework on fwk update, which was a PITA.

Faced with this and given the task to develop half a dozen large apps with it
I ridiculed this approach only received "impossible to change 2.x design" answers ;-)
I created some vcx mangling code to injected the corresponding user lib for every fwk lib
sent this to Rainer with some msg to reward me for the "impossible" demand
and refused to get involved in the already troubled dev task if this was not part of next release.

Yes, working with it reminds of 80ies stuff, but the option to switch without recurring pain
to self developed parts / routines and solutions replacing Extend stuff is best of all fwks.

Every reason to switch RI code if DBC already broken.... And yes, relations are needed for most of the builders to work as designed, but IIRC that does NOT imply you have to use vfp RI.
Probably MS fixed "buggy" on vfp 7 to 9, but left "ugly"

regards
thomas

>I looked into that in the 90's, found that I need multiple (named) DBC's per program and never touched the whole MODI DATA again. I have a own meta system that fit's better to my needs all the time. I use own code that deals with this on business level. I have a kind of dynamic relationships, where two fields define the target and target table, this is all to complex for those builders. So I stuck with my RI - SQL solution 25 years old. :)
>
>The problem is with a friend who uses Visual Extend. He's not very deep into this, and the framework uses this builder stuff, and he has asked for help. So I was able to figure out what was gone and what to recreate, but died on the DBC.RIINFO or ADBOBJECTS(laArray,'Relation') 5th column.
>As Al suggested one can circumvent this by carefully copying the DBC. So just creating all what one can create and then copy an old version of the DBC over it, looks like all fits.
>
>I end up fixing the CDX and VALIDATE DATABASE until he could open the crap and run it's framework's repair/update against it, and all was fine.
>
>Lutz
>
>>Hi Lutz,
>>
>>Hint for quick fox AND lazy dog: Do not use the DBC generated RI.
>>I read you don't use Stonefield and from the thread guess you don't use xCase as well -
>>Look inside the old Booth / Sawyer foxpro book - it has SQL based RI code easier to follow.
>>Steve is still around - drop him a line if you don't have the book...
>>
>>my 0.22€
>>thomas
>>
>>>My problem is referential integrity.
>>>Open a database with foreign keys using OPEN DATA .. EXCL, then MODI DATA. Right click a relationship (the line), select "Edit Relationship integrity".
>>>
>>>There are three pages where you can set referential integrity for the relationship. To do this using code is the goal.
>>>
>>>You get the actual setting using ADBOBJECT(laArra,'RELATION'), as Tamar suggested, but how to set?
>>>
>>>Tip:
>>>Help on ALTER TABLE ... ADD FOREIGN KEY is wrong anyway. COLLATE is placed wrong. See https://github.com/VFPX/HelpFile/issues/18
>>>
>>>I do not use that, but a friend comes up with a corrupted database made by a framework that creates this stuff. I know what to set, but not how, and on IDE it is a no go. To many elements.
>>>
>>>Lutz
>>>
>>>Update:
>>>The field in the DBC, RIINFO, has a description as .. used by the Referential Integrity Builder (in 60dbc.frx) but automatically used by VFP.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform