Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 6 Monaten, 2 Wochen
Letzter Beitrag:
vor 6 Monaten, 2 Wochen
Beteiligte Autoren:
Sivaprakash, GuenterP, Steven Sitas, Joris, Bart VDE

Re: viewing Referential integrity in HFSQL Control centre

Startbeitrag von Sivaprakash am 30.01.2017 11:11

Hello,

Is there any way to view the referential integrity constraint in a database, from HFSQL control center? Need to verify, whether that has been updated or not.

Sometimes, we add the RI after the database has been created. And try to upgrade the database using HModifyStructure, Need to ensure a way that those links are updated or not...

If that facility is not available in Control centre, is there any other way to check it ?

Happiness Always
BKR Sivaprakash

Antworten:

Re: viewing Referential integrity in HFSQL Control centre

Hi,

I wouldn't count on that. My experience with HModifyStructure is that the constraints are not always correct.
Like for many things in WD, I leave the automatic features for what they are and do the constraint checking myself.

It's kind of funny (sic) : you asked 2 questions lately on this forum (URLEncode and now this), and none of these 2 work as expected. Sad.

Regards,
Bart

von Bart VDE - am 30.01.2017 11:37

Re: viewing Referential integrity in HFSQL Control centre

Hi,

If you open your database in the control center then there should be a tab 'Links'.

Regards,

Joris

von Joris - am 30.01.2017 15:57

Re: viewing Referential integrity in HFSQL Control centre

Yes Joris,

It's listing all RI for that database. I was searching in each file, didn't thought at database level.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 31.01.2017 05:05

Re: viewing Referential integrity in HFSQL Control centre

Hi Bart,

for version 21 I tested HModifyStructure(..) extensively. It seems to work just fine now. Wouldn't trust in any version prior to v21 for a correct restructuring with observing new links / deleting deleted links / changing link info, however. That resulted in double and triple links when looking at them in the HFSQL Control Center. I recommend to use WDMODFIC via ExeRun(..) there.

von GuenterP - am 31.01.2017 05:52

Re: viewing Referential integrity in HFSQL Control centre

Guenter Predl,

Have you tried changing the filename ? Is it checking the RI rightly ? I'm facing problem after changing the name of the file that got RI. I'm using WD21.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 31.01.2017 06:25

Re: viewing Referential integrity in HFSQL Control centre

Hi Sivaprakash,

1. Add a RI rule after a database is created _and_ there are NO data affected by the new RI rule (NO PROBLEM):
Use WDMODFIC
or just DELETE the links and RECREATE them with code.
Never trust HModifyStructure ...

2. Add a RI rule after a database is created _and_ there are data affected by the new RI rule (?PROBLEM)
Here it depends on the RI rule _and_ you may have to take care of your previous/production data and ofcourse use WDMODFIC etc

PARADIGM (for 2)
---------------
IF say you add a new [1,1]-[0,n] link to a table already populated with data, then you are looking for trouble and some of your queries may NOT work.
So either you do the NEW RI with with code (triggers etc) OR
you update the affected table _and_ point all the previous records of the table to a default FK.

Regards
Steven Sitas

von Steven Sitas - am 31.01.2017 09:44

Re: viewing Referential integrity in HFSQL Control centre

Quote
Sivaprakash
Guenter Predl,

Have you tried changing the filename ? Is it checking the RI rightly ? I'm facing problem after changing the name of the file that got RI. I'm using WD21.

Happiness Always
BKR Sivaprakash


Hi Sivaprakash,
no, I did not change file names! The tests comprised structural changes only. Adding / deleting / altering Link information and deleting / adding / changing field names and types.

von GuenterP - am 31.01.2017 10:11

Re: viewing Referential integrity in HFSQL Control centre

Thanks Steven Sitas and Guenter Predl.

von Sivaprakash - am 31.01.2017 10:49
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.