M
Mark A. Sam
Hello,
For years my ASP used the following Script:
<%while NOT rs.EOF
Datel = ""
Recur = ""
if rs("Recurring") = False then
DateL = rs("DateLoading")
else
Recur = "Recurring"
End If
if rs("TrailerLength") =0 then
tLength = ""
else
tlength = rs("TrailerLength")
End If
%>
This never seemed to be a problem, but today I was doing a test of my search
page which utilizes this code and got a runtime error. The problem was the
line,
tlength = rs("TrailerLength")
Which didn't like "" as a value for rs("TrailerLength")
Do I changed
if rs("TrailerLength") =0 then
tLength = ""
to
if rs("TrailerLength") = "" then
tLength = 0
which solved the problem. To script it now:
<%while NOT rs.EOF
Datel = ""
Recur = ""
if rs("Recurring") = False then
DateL = rs("DateLoading")
else
Recur = "Recurring"
End If
if rs("TrailerLength") = "" then
tLength = 0
else
tlength = rs("TrailerLength")
End If
%>
Does anyone know why suddenly I can't assign "" to the variable tlength?
I have another problem with updated records, and an answer to this may help
me to debug that.
Thanks and God Bless,
Mark A. Sam
For years my ASP used the following Script:
<%while NOT rs.EOF
Datel = ""
Recur = ""
if rs("Recurring") = False then
DateL = rs("DateLoading")
else
Recur = "Recurring"
End If
if rs("TrailerLength") =0 then
tLength = ""
else
tlength = rs("TrailerLength")
End If
%>
This never seemed to be a problem, but today I was doing a test of my search
page which utilizes this code and got a runtime error. The problem was the
line,
tlength = rs("TrailerLength")
Which didn't like "" as a value for rs("TrailerLength")
Do I changed
if rs("TrailerLength") =0 then
tLength = ""
to
if rs("TrailerLength") = "" then
tLength = 0
which solved the problem. To script it now:
<%while NOT rs.EOF
Datel = ""
Recur = ""
if rs("Recurring") = False then
DateL = rs("DateLoading")
else
Recur = "Recurring"
End If
if rs("TrailerLength") = "" then
tLength = 0
else
tlength = rs("TrailerLength")
End If
%>
Does anyone know why suddenly I can't assign "" to the variable tlength?
I have another problem with updated records, and an answer to this may help
me to debug that.
Thanks and God Bless,
Mark A. Sam