Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 27th, 2004, 01:01 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sun ONE ASP VBScript runtime (0x800A0006)

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


 
Old January 27th, 2004, 06:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

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).
 
Old January 28th, 2004, 12:08 AM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

so are you saying to change:

gvT01s(1)=Cint(Mid(sData,1,5))

to

gvT01s(1)=CLng(Mid(sData,1,5))

trevor

 
Old January 28th, 2004, 05:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript runtime (0x800A0005) mail1 Classic ASP Basics 4 March 27th, 2008 03:42 PM
VBScript runtime SATYABBSR Pro VB.NET 2002/2003 1 January 10th, 2007 11:13 AM
Microsoft VBScript runtime (0x800A0005) Swetz Classic ASP Components 0 May 14th, 2006 03:44 AM
Microsoft VBScript runtime (0x800A000D) stitch Classic ASP Basics 1 April 27th, 2006 02:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.