PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WEBDEV 2024
→
WebDev 22 Page Initialisation Code runs twice
WebDev 22 Page Initialisation Code runs twice
Started by Anthony, Oct., 12 2017 8:47 PM - No answer
Connect yourself…
Anthony
#1
Registered member
4 messages
Posted on October, 12 2017 - 8:47 PM
Hi,
I have initialisation code running twice which in effect runs SQL functions within procedures twice so I thought I would test it in a new WB 22 app 1 page no other code and to me it runs twice.
1 page the only code in the init of the page is:-
s
MySessionTest
is string
=
GetGUID
(
)
x
is int
=
0
Trace
(
s
MySessionTest
+
CR
)
LOOP
(
5
)
x
=x+
1
Trace
(x)
END
Which results in:-
{e3272487-8fcc-4c6a-acff-b4b8cadbdba4}<\r><\n>
1
2
3
4
5
{aecc108f-7d97-4498-be8d-31dde25662ab}<\r><\n>
1
2
3
4
5
I load the page once in the browser and to me its running the init code twice.
I noticed it on a web app that uses MS SQL in procedures which are called in the init code of the page, I can see on the MS SQL profiler its running the select statement twice.
So ignore the SQL version which I am not showing here why in this example would it run the page init code twice?
Is it expected that the init code runs twice? if so I have to remove my code from the init but how can I call it once on page load?
Thanks
Tony
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text