By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,278 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,278 IT Pros & Developers. It's quick & easy.

overflow error

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.