473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 12689
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: JKop | last post by:
You know how the saying goes that *unsigned* overflow is... well.. defined. That means that if you add 1 to its maximum value, then you know exactly what value it will have afterward on all...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
4
by: Chua Wen Ching | last post by:
Thanks Derek... Okay i had another question.. my program runs smoothly for the first minute, after 1 minute... suddenly it breaks and display this error: do you know what is the cause of...
25
by: junky_fellow | last post by:
Is there any way by which the overflow during addition of two integers may be detected ? eg. suppose we have three unsigned integers, a ,b, c. we are doing a check like if ((a +b) > c) do...
8
by: starffly | last post by:
In my program, the caculated value is supposed to be no more than the constant named MAXINT,otherwise, overflow error will be informed.however, I cannot test if the value exceeds MAXINT within the...
10
by: Parachute | last post by:
Using Borland Builder 6, I get numerical overflow when running a small programme without CodeGuard ("exp: OVERFLOW error"). The programme does not give any error messages when CodeGuard is...
1
by: zaneh | last post by:
I have found TheScripts a very useful site, but however I cannot find an answer to a problem I am having, so I finally have to ask the question! I am getting an Overflow error in a Function I have...
3
by: MLH | last post by:
A wide comma delimited text file import into A97 failed with an overflow error. I'm estimating it to have been no more than 1000 records. 100% of all the fields were quoted strings or ZLS's. ...
3
by: jer006 | last post by:
Hi I am writing a select statement that has an arithmetic function inside a case statement that uses logic to decide whether to divide or multiply and when I run the arithmetic statements outside...
42
by: thomas.mertes | last post by:
Is it possible to use some C or compiler extension to catch integer overflow? The situation is as follows: I use C as target language for compiled Seed7 programs. For integer computions the C...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.