If 1 record matches the ID then everthing goes fine
if more than 1 record matches the ID i got Server.ScriptTimeout
Does somebody has any idea why this happens?
dim ID
dim Typering
dim x
dim checkbox(30)
ID = request.Querystring("ID")
Connection.open database
Recordset.open "Select * FROM Types where TypesID=" & ID, connection, 1
while not recordset.EOF
Typering = recordset.fields("Typering")
if Typering <> "" then
x = 0
if right(Typering,1) <> "," then
Typering = Typering & ", #"
end if
array_checkbox = Split(Typering, ", ")
For i = 0 to Ubound(array_checkbox) - 1
Do until Cstr(x) = array_checkbox(i)
x = x + 1
if Cstr(x) = array_checkbox(i) then
checkbox(x) = "checked"
end if
loop
next
end if
recordset.movenext
wend
recordset.close
connection.close
set recordset = nothing
set connection = nothing
if more than 1 record matches the ID i got Server.ScriptTimeout
Does somebody has any idea why this happens?
dim ID
dim Typering
dim x
dim checkbox(30)
ID = request.Querystring("ID")
Connection.open database
Recordset.open "Select * FROM Types where TypesID=" & ID, connection, 1
while not recordset.EOF
Typering = recordset.fields("Typering")
if Typering <> "" then
x = 0
if right(Typering,1) <> "," then
Typering = Typering & ", #"
end if
array_checkbox = Split(Typering, ", ")
For i = 0 to Ubound(array_checkbox) - 1
Do until Cstr(x) = array_checkbox(i)
x = x + 1
if Cstr(x) = array_checkbox(i) then
checkbox(x) = "checked"
end if
loop
next
end if
recordset.movenext
wend
recordset.close
connection.close
set recordset = nothing
set connection = nothing