Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
18
Erster Beitrag:
vor 1 Jahr, 10 Monaten
Letzter Beitrag:
vor 11 Monaten, 3 Wochen
Beteiligte Autoren:
Curtis, GuenterP, Steven Sitas, Piet van Zanten, Allard, ICI

[WD20] Integrity Bug - Children Not Deleted

Startbeitrag von Curtis am 22.10.2015 15:24

I am using client/server. I have a file named Inventory and a file named InventoryItem. I have set up a link between the two with the option, "Delete the Inventory and all InventoryItem". When I delete an Inventory from my program the children(InventoryItem) do not get deleted. My deletion code is HDelete(Inventory,HRecNum(Inventory)).

Thoughts?

Antworten:

Hi,
Maybe your index is corrupted. Try repair.

von ICI - am 22.10.2015 19:50
Did not change anything. Thanks though!

von Curtis - am 22.10.2015 21:22
Hi Curtis,

it may be that the analysis includes duplicate file links after some changes to the analysis. Just use the HFSQL Control Center to view the file links of the two files and delete / correct the situation there.

von GuenterP - am 23.10.2015 05:43
Was not able to find any duplicate links, thanks though!

von Curtis - am 23.10.2015 19:56
Fixed it by deleting the link, checking back in to scm, checking back out and re-adding the link. Maybe something was corrupt that did not get fixed by repairing and reindexing the db?

von Curtis - am 23.10.2015 22:17
Hi Curtis,

This is a cool feature but I personally never use it.

I alway do following.

1 Before removing the inventory surch if ther eare any lines . If so delete all of them

If Hreadseekfirst( inventoryline, inventoryID,Invetory. InventoryID) then

For all inventoryline where inverntoryID = inventory.inventoryID
Hdelete( inventoryline)
end
End

Then you can delete the inventory file .

Bit more coding but it gives me a more save fealing

Regards
Allard

von Allard - am 24.10.2015 07:38
Update:

I have this problem with several linked constraints. After some amount of time the link stops working. I delete the link and recreate it and it works again. Has anyone had this issue before? We have a lot of linked constraints, but I fear we might have to go back through our whole application and write our own deletion code.

von Curtis - am 29.08.2016 20:46
Hi, did you inspect the links in the HFSQL Control Center? There may be duplicates existing for that link! If so, children wont be deleted in some cases. After correction, just inspect the link in the analysis once again for the correct options.

von GuenterP - am 30.08.2016 05:34
I'm not seeing any duplicates, but I am seeing 139 links in the control center while I only see 109 links listed in the analysis view. Cleanup time.

Edit: It looks like most of the extra constraints are WinDev framework constraints because they are in French.

von Curtis - am 30.08.2016 13:36
Hi Curtis,

1. Which version are you using (HF and WINDEV) ?
2. How do/did you handle your modifications in the analysis ?

Steven Sitas
www.alpha360.biz

von Steven Sitas - am 30.08.2016 14:04
1. WinDev 20. HFSQL C/S is version 20 I believe. The control center lists a module version of 20.0.103.0.

2. I do all my modifications in the graphical representation of the analysis. Then I generate, synchronize, and assume it is ready to go.

Also, I am getting an error when trying to delete a certain link from the control center.

An error occurred while deleting the link.
Error returned by server:
The link between category.categoryid and item.categoryid is unknown.

Any idea on how to delete this or remove it from the list?

von Curtis - am 30.08.2016 14:15
Hi,
There where some bugs concerning LINKs in v17 - I remember reporting them to PCSoft and the fixes where in a later version.
But if you moved from a database that had these problems (say a v17 database) to a newer version (v20 database) the problems would follow you.
And one of the symptoms is the error(s) you are getting when trying to delete a link from the control center ....

Here is how to fix them:
A - If the problem is in ONLY one of your databases (you are LUCKY)
1. Do a backup of your data
2. Copy this backup and its data to a safe place, extract it (if zipped) and DOUBLE check everything is OK.
3. Delete the Database from the control center
4. Create a new one (EMPTY) from the control center
5. Copy ONLY your data to the directory of the NEW database
6. Use Modfic or your IDE (Synchronize Data ...) and it will recreate all your links

if you are still having problems - your in B.

B - the problem has affected your whole Database installation.
The reason is that HFSQL can have LINKs that point from ONE DATABASE to ANOTHER !!!
How where they created? - I don't know - it was one of the bugs I posted ...

You can contact support to help you fix this problem.
I personally did backups, uninstalled my HF C/S, cleaned all folders, reinstalled HF and went through A for every database.

After that I never trust LINKs to behave 100% correctly in constraints - so I use other techniques.

Steven Sitas
www.alpha360.biz

von Steven Sitas - am 30.08.2016 14:57
Hm, the analysis is yours, the "framework" has nothing to do there. In principle. Except for links which require an intermediate file because of, ahem, weak description. So, tell us some French names of links.

Info: none of my analysis files is "French" because any queries or reading / writing of the files has to be under my control.

von GuenterP - am 30.08.2016 15:08
Thanks for the info Steven. I actually needed the link I was trying to delete, but it was named differently in my analysis. I deleted the link in my analysis and recreated with the name that was showing in the control center.

Guenter, some of the extra French links are:

Contrainte_Groupe_Projet
Contrainte_Intervenant_Complement_Groupe
Contrainte_Intervenant_ConfigCreationMultipleTache
Contrainte_Intervenant_Historique

I'm also seeing some links like this: Constraint_WDGPU_Configuration_WDGPU_Element. I wonder if those have to do with the user groupware we got rid of?

von Curtis - am 30.08.2016 15:17
Hi, there was always the possibility to copy a file's description - together with its connection ;-) So, the advice is: never ever put any connection infos into the analysis! All files should have "application directory" as a connection information. The real connection thing has to be done in the project code by HOpenConnection(..). This makes the application independent of who is using it where.

von GuenterP - am 30.08.2016 15:18
Quote
Curtis
Thanks for the info Steven. I actually needed the link I was trying to delete, but it was named differently in my analysis. I deleted the link in my analysis and recreated with the name that was showing in the control center.

Guenter, some of the extra French links are:

Contrainte_Groupe_Projet
Contrainte_Intervenant_Complement_Groupe
Contrainte_Intervenant_ConfigCreationMultipleTache
Contrainte_Intervenant_Historique

I'm also seeing some links like this: Constraint_WDGPU_Configuration_WDGPU_Element. I wonder if those have to do with the user groupware we got rid of?


All with WDGPU is user groupware!
The text "Constraint..." is filled by the link wizard. It is recommended to input a more descriptive link name. Intervenant.. links: think about what the link should really do and change the link definition accordingly.

von GuenterP - am 30.08.2016 15:52
Hi Curtis,

I've had problems with links too, also the one Steven mentions.
I don't know if it's a bug or a feature, but links are only created on HFSQL server if all files involved in the link already exist. So you first have to create the files and then do a WDModfic to get all the links to the HFSQL database.
(At least up to v19 this is the case, I did not use a higher version yet)

Regards,
Piet

von Piet van Zanten - am 31.08.2016 05:54
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.