|
Subject:
|
Sun ONE ASP VBScript runtime (0x800A0006)
|
|
Posted By:
|
trevor
|
Post Date:
|
1/27/2004 12:01:32 AM
|
Hi, my site was up and running fine. then, the isp did an upgrade.
nothing was working couldn't connect to database, etc the isp techs neglected to move my site onto a ChiliSoft machine. so they immediately moved it to a ChiliSoft machine.
the techs helped with everything and really did a great job getting things back to normal except for one dynamic web page.
I get this message: Technical Information (for support personnel)
Error Type: Sun ONE ASP VBScript runtime (0x800A0006) Overflow Inc/t01rec.asp, line 8
AS I said, this worked great before the ISP updated their servers.
Now let's look at the asp code:
<% Sub T01Rec(iRec) Dim sFile, sData sFile = Server.MapPath(gsT01Data) sData=TDBReadData(sFile,iRec,giT01Data) If gbDebug Then response.write "T01Rec=" & iRec & " Data=" & sData & "<br>" giT01DataPtr=iRec gvT01s(1)=Cint(Mid(sData,1,5)) gvT01s(2)=Cint(Mid(sData,8,2)) gvT01s(3)=Cint(Mid(sData,6,2)) End Sub %>
this is line 8: gvT01s(1)=Cint(Mid(sData,1,5))
I am very hesitant to change anything since it worked before the update at the isp. on the other hand, I am not sure what or if anything was changed when they had their techs bughunt my site.
So what can I do with this script so that it doesn't cause the error?
trevor
|
|
Reply By:
|
pgtips
|
Reply Date:
|
1/27/2004 5:03:08 AM
|
Sounds like the number in Mid(sData,1,5) is too big to be converted to an Int (hence the overflow message). Try changing to CLng (long integer).
|
|
Reply By:
|
trevor
|
Reply Date:
|
1/27/2004 11:08:05 PM
|
so are you saying to change:
gvT01s(1)=Cint(Mid(sData,1,5))
to
gvT01s(1)=CLng(Mid(sData,1,5))
trevor
|
|
Reply By:
|
pgtips
|
Reply Date:
|
1/28/2004 4:52:02 AM
|
quote: Originally posted by trevor
so are you saying to change:
gvT01s(1)=Cint(Mid(sData,1,5))
to
gvT01s(1)=CLng(Mid(sData,1,5))
trevor
Yes, that's what I'm saying to fix the overflow error. Whether that will cause other problems depends on what is done with the data once its in the array gvT01s, e.g. if there is other code later on that attempts to do a CInt on gvT01s(1) that wil fail.
hth Phil
|