469,330 Members | 1,329 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

overflow error

MFA
Hi All

I am getting this error.

Microsoft VBScript runtime (0x800A0006)
Overflow: '[number: 32768]'
I am using if and case statments a lot, at certain point when I am just
putting another case statment its giving me this error. if I am removing
that line its OK
same code I tried with if conditions and clng(objRec("TEMP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TEMP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat3.asp" -->
<%
END SELECT
any one know whats problem.
Is there any limit to put if and else statements in asp page ?

kind regards



Jul 19 '05 #1
2 12244
The line in question is most probably:

TEMP_TYPE = cint(objRec("TEMP_TYPE"))

You are converting the Temp_type to an Int, whose max limit is 32768. Try
converting into a Long instead

TEMP_TYPE = CLng(objRec("TEMP_TYPE"))

Also, before converting, check what value the Temp_Type contains, perhaps a
Null even? So, check

If IsNull(objRec("TEMP_TYPE")) Then
TEMP_TYPE = 0
Else
TEMP_TYPE = cint(objRec("TEMP_TYPE"))
End If
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"MFA" <MFA@MFA> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
Hi All

I am getting this error.

Microsoft VBScript runtime (0x800A0006)
Overflow: '[number: 32768]'
I am using if and case statments a lot, at certain point when I am just
putting another case statment its giving me this error. if I am removing
that line its OK
same code I tried with if conditions and clng(objRec("TEMP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TEMP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat3.asp" -->
<%
END SELECT
any one know whats problem.
Is there any limit to put if and else statements in asp page ?

kind regards


Jul 19 '05 #2
MFA
Thanks for your reply..

I have checked with cint(objRec("TEMP_TYPE")) and clng(objRec("TEMP_TYPE"))
.. I am only processing it when its not null.

any way thanks again for your time and reply..

regards

"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
The line in question is most probably:

TEMP_TYPE = cint(objRec("TEMP_TYPE"))

You are converting the Temp_type to an Int, whose max limit is 32768. Try
converting into a Long instead

TEMP_TYPE = CLng(objRec("TEMP_TYPE"))

Also, before converting, check what value the Temp_Type contains, perhaps a Null even? So, check

If IsNull(objRec("TEMP_TYPE")) Then
TEMP_TYPE = 0
Else
TEMP_TYPE = cint(objRec("TEMP_TYPE"))
End If
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"MFA" <MFA@MFA> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
Hi All

I am getting this error.

Microsoft VBScript runtime (0x800A0006)
Overflow: '[number: 32768]'
I am using if and case statments a lot, at certain point when I am just
putting another case statment its giving me this error. if I am removing that line its OK
same code I tried with if conditions and clng(objRec("TEMP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TEMP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat3.asp" -->
<%
END SELECT
any one know whats problem.
Is there any limit to put if and else statements in asp page ?

kind regards



Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

44 posts views Thread by JKop | last post: by
4 posts views Thread by Chua Wen Ching | last post: by
25 posts views Thread by junky_fellow | last post: by
8 posts views Thread by starffly | last post: by
10 posts views Thread by Parachute | last post: by
3 posts views Thread by jer006 | last post: by
42 posts views Thread by thomas.mertes | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.