PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD20] what wrong with hOnError()
[WD20] what wrong with hOnError()
Débuté par ccc2, 23 jan. 2018 06:54 - 2 réponses
Posté le 23 janvier 2018 - 06:54
Hi,

weird problem with this function .

I copy the code wd12 project to wd20 project. I just change table name

HOnError(Company,hErrDuplicates,err_dup)
hadd()
HOnError(Company,hErrDuplicates)

when i run test I keep getting the automatic management error . I couldn't find what the problem .
later I found the solution. I delete the paarameter hErrDuplicates and recreate then it work.

what the hell ? anyone get same strange problem
Posté le 23 janvier 2018 - 07:16
Hi, you have to consider that "constraints" (duplicates treatment is one of them) are written into the data file at creation time. Changing these parameters on the fly by programming may not have the intended impact on data?
Posté le 25 janvier 2018 - 02:18
Hi Guenter,

it's not the constraint issues . after try and error , i found that hOnError() behave like dialog() problem when copy / paste the code. dialog() only give problem when copy paste between project.

it's not a big problem , I just type rather than copy paste.