This topic is locked

for next in After Update

10/2/2008 7:39:23 AM
ASPRunnerPro General questions
M
marcove author

Hi,
I've a problem with a FOR NEXT application.
I Add this code in "After record Updated" event, and I've this problem: It doen't execute code after NEXT.

When cicle end it's open the edit page without executing code written after NEXT instruction.

Pls Here I put the code Could You help me?

Thank you in advance.

Mat
CODE:

***

for t=6 to 103

datm=(FormatDateTime(kval(t+2),2) & " ")

kval(t)=datm

j=t+1

jj=t+2

jjj=t+3

jjjj=t+4

response.write(t)

response.write(" /")

if kval(jj) <> "" then

timm=formatDateTime(kval(t+3), vbShortTime)

dtimm=datm & " " & mid(timm,1,2) & ":" & mid(timm,4,2)

strSQLInsert = "insert into dbo.Presenze ( ID, Mese, Anno) values ( "& kval(1) &", '"& kval(3) &"', "& kval(2) &")"

dbConnection.Execute strSQLInsert

t=t+2

end if

next

dbConnection.Execute "exec CalcoloOra"


Sergey Kornilov admin 10/6/2008

Most probably there is an error in this code which prevents last statement from being executed.

M
marcove author 10/8/2008

Sorry,
but code works correctly, why application built using ASPR 5.2 have this problem?

If I put this code in a new handmade .Asp page it's work properly.

Regards

Mat

Sergey Kornilov admin 10/8/2008

When you place your code to event ASPRunnerPro does nothing but lets your code run.
If code doesn't run (even if it works fine in some other place) you need to troubleshoot it to find what exactly doesn't work.