|
| re-calling of same Global Procedure |
| Iniciado por guest, 25,oct. 2016 11:53 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 25,octubre 2016 - 11:53 |
Hi,
I have a procedure called e.g. GP_UpdateSP. This is called from various other places in my system. The procedure currently uses a number of data sources for its reference tables.
The problem I have is that the procedure can be called (indirectly from itself).
Supposing it all starts from another procedure called GP_UpdatePO. This procedure may call GP_UpdateSP. GP_UpdateSP may then call GP_UpdatePO(with different parameters) which may then call GP_UpdateSP.
If this happens then GP_UPdateSP errors because the Data Sources already exist. How can I get around this?
Many thanks Reg |
| |
| |
| | | |
|
| | |
| |
| Publicado el 25,octubre 2016 - 12:15 |
Hi Reg
my first answer is : DON'T do it
You are in recursive situation, and recursivity is NOT supported in wlanguage... The call stack is just too short for this kid of programming.
Now if you really want to do it and wait for the crash, then you'll have to declare your data sources OUTSIDE/BEFORE starting to call your procedures... But it still is a really bad idea.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 25,octubre 2016 - 12:19 |
With recursive code and data source you have a problem.
check the help for Data source (Type of variable) in the Notes section.
http://doc.windev.com/en-US/… |
| |
| |
| | | |
|
| | |
| |
| Publicado el 27,octubre 2016 - 13:38 |
Fabrice, Paulo...
Thanks for the help, sorry I haven't replied earlier. This problem caused me a major issue with a system that I've been trying to dig my out of for the past few days.
Kind Regards Reg |
| |
| |
| | | |
|
| | | | |
| | |
|