NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: britech on July 29, 2010, 01:10:09 PM

Title: Procedure Setup Code not firing reliably.. PR26
Post by: britech on July 29, 2010, 01:10:09 PM
Hi Folks,

I was having trouble capturing some session variable data.
The code was written into the Procedure Setup embed on a NetWebForm template.
I added a Message() statement to see what the value was and discovered that the code on the Procedure setup embed point doesn't always fire.
When it does, it fires about 5 or 6 times.

On 8 attempts to open the form, the WebServer only produced the message statementon  2 occassions.
All other accesses to the webform failed to produce the message at all.

Could we be missing something in our approach. Is the Procedure Setup embed NOT a good place to put code?

Look forward to your comments.
Brian
Title: Re: Procedure Setup Code not firing reliably.. PR26
Post by: Alberto on July 29, 2010, 01:25:46 PM
Brian,

Do not use this embed point.
Try to use
Generate From / Start

Hope this helps
Alberto
Title: Re: Procedure Setup Code not firing reliably.. PR26
Post by: britech on July 29, 2010, 01:31:01 PM
Thanks Alberto,
You may have just saved our collective asses on this project.
Appreciate the quick response.
Brian
Title: Re: Procedure Setup Code not firing reliably.. PR26
Post by: kevin plummer on July 29, 2010, 04:28:55 PM
The other useful embeds are Pre-Insert and Pre-Update remembering on a memory form it will only hit the pre-update embed.

Also using message can be deceptive in some places as multiple Threads are firing. You should use dbgview  with p_web._trace('xxx')