473,785 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("TE MP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TE MP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat 1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat 2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat 3.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 12734
The line in question is most probably:

TEMP_TYPE = cint(objRec("TE MP_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("TE MP_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("TE MP_TYPE"))
End If
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"MFA" <MFA@MFA> wrote in message
news:O7******** ******@TK2MSFTN GP10.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("TE MP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TE MP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat 1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat 2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat 3.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("TE MP_TYPE")) and clng(objRec("TE MP_TYPE"))
.. I am only processing it when its not null.

any way thanks again for your time and reply..

regards

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

TEMP_TYPE = cint(objRec("TE MP_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("TE MP_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("TE MP_TYPE"))
End If
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"MFA" <MFA@MFA> wrote in message
news:O7******** ******@TK2MSFTN GP10.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("TE MP_TYPE"))

Here is my code

TEMP_TYPE = cint(objRec("TE MP_TYPE"))

SELECT CASE TEMP_TYPE
CASE 1
%>
<!--#include file="M_Templat 1.asp" -->
<%
case 2
%>
<!--#include file="M_Templat 2.asp" -->
<%
case 3
%>
<!--#include file="M_Templat 3.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
8577
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 implementations. But then you have signed integers. Let's say a signed integer is set to its maximum positive value. If you add 1 to it, what happens?: A) It's implementation defined what value it will
19
3145
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 (nested), three list views, one tree control with up to 30,000 nodes, maybe 15 comboboxes (half of which have a large recordset as rowsource), 20 or so buttons and around 30 text boxes (not to mention the images, labels, etc and around 1000 lines...
4
12898
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 this problem...
25
6275
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 something;
8
10675
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 integer scope smaller than MAXINT,so I want to seek a measure to test the excess without the value's comparing to MAXINT. Please let me know if you have a good idea. THX.
10
1109
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 activated during the run. The equation that causes overflow uses the exp-function, but given and resulting values are not very large (and are written in double-variables anyway). So why does it seem as if there were not enough space in the buffer? And...
1
3319
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 written. BUT... It does not occur all the time. If I call the Function from the "After Update" event for a checkbox, it works as intended, how ever if I call the Function from the "On Load" event of the Form, testing to see whether the...
3
2164
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. What most likely caused the overflow? Might it be upper limit on number of fields in table?
3
10745
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 the case statement they work fine, but blow up with an overflow error in the case statement. The select looks like: SELECT a.acct_cd, a.crrncy_cd, a.mkt_val, c.rate,
42
7036
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 type 'long' is used. That way native C speed can be reached. Now I want to experiment with raising a Seed7 exception (which is emulated with setjmp(), longjmp() in C) for integer
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.