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 2 12736
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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...
|
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...
|
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;
|
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.
| |
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...
|
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...
|
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?
|
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,
|
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
|
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...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
| |
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
|
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...
| |