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

Home Posts Topics Members FAQ

Explain this (if you dare)

Let me just start by saying I'm a very accomplished ASP programmer. I need
to rely on that becuase this error boggles the mind.

Just today, I had to troubleshoot an error in one of my applications and I
tracked it down to a single condition statement. Here it is (very complex
code to follow):

<code>

If (CSng(ccTuition ) <> tuition) Then

</code>

Again, just today, this line started to disfunction. I validated the values
and they're 100% accurate. I use singles to account for decimals. I began
trying different combinations, using CDbl and other conversions. Nothing
worked. Then (and this is the best part), I tried: If (12 = 12) Then...and
IT FAILED!!!!

I can't even begin to fathom this issue, not only does the condition not
validate, but it just started happening out of the blue. I've since changed
my statement to a string comparison becuase nothing else was working.

I'm going to lunch, boggled as ever.
Jul 26 '05
19 1453
Jordan wrote:
Let me just start by saying I'm a very accomplished ASP programmer. I
need to rely on that becuase this error boggles the mind.

Just today, I had to troubleshoot an error in one of my applications
and I tracked it down to a single condition statement. Here it is
(very complex code to follow):

<code>

If (CSng(ccTuition ) <> tuition) Then

</code>


What are TypeName(ccTuit ion) and TypeName(tuitio n), respectively?
http://msdn.microsoft.com/library/en...cttypename.asp
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 26 '05 #11
what type of error are you receiving?

Jul 26 '05 #12
No error message. It works system wise, just not logic wise. See my reply to
Ray Costanzo as I'm going to clarify.

"Matt" <ma***********@ manning-napier.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
what type of error are you receiving?

Jul 26 '05 #13
Yes, you have it correct, but I responded to quickly and didn't proof my
response - my apologies. That's what I get for posting/replying to messages
today, it's quite hectic.

My statement should evaluate False, but it evalutes to True.

Anyway, your example is correct. "1 <> 1" should evaluate to false since 1
does equal 1. That's the issue I'm having. My line of code "If
CSng(ccTuition) <> tution" evaluted to True, but it in-fact was false,
becuase both values were equal. That's why the application wasn't working to
completion, becuase it got stuck evaluting to True when it should've been
False.

All the combinations too, evaluted to True (using CSng, CDbl, etc.).

I'm rebooting tonight and going to try to use this old code again. Honestly,
I love ASP, but this is the oddest thing I've ever seen.

Jordan

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eb******** ******@TK2MSFTN GP14.phx.gbl...
Alright, then I guess the values ARE equal since "if <>" evaluates to
false.

If 1 <> 1 Then
''true condition
Else
''False condition - this is what will be executed
End If

Ray at work

"Jordan" <jf*****@learn. colostate.edu> wrote in message
news:Op******** ******@TK2MSFTN GP09.phx.gbl...
Fails. Fails means it evaluates to false, when it should be true. No

error,
becuase it does compile and evaulate to a condition, just the wrong
condition!

Thanks, j
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
> If CSng(ccTuition) <> CSng(tution) Then
>
> What does that do? What does "failed" mean? Do you get an error?
>
> Ray at work
>
> "Jordan" <jf*****@learn. colostate.edu> wrote in message
> news:uE******** ******@TK2MSFTN GP09.phx.gbl...
>> Let me just start by saying I'm a very accomplished ASP programmer. I
>> need
>> to rely on that becuase this error boggles the mind.
>>
>> Just today, I had to troubleshoot an error in one of my applications and >> I
>> tracked it down to a single condition statement. Here it is (very complex >> code to follow):
>>
>> <code>
>>
>> If (CSng(ccTuition ) <> tuition) Then
>>
>> </code>
>>
>> Again, just today, this line started to disfunction. I validated the
> values
>> and they're 100% accurate. I use singles to account for decimals. I began >> trying different combinations, using CDbl and other conversions. Nothing >> worked. Then (and this is the best part), I tried: If (12 = 12)
> Then...and
>> IT FAILED!!!!
>>
>> I can't even begin to fathom this issue, not only does the condition not >> validate, but it just started happening out of the blue. I've since
> changed
>> my statement to a string comparison becuase nothing else was working.
>>
>> I'm going to lunch, boggled as ever.
>>
>>
>
>



Jul 26 '05 #14
> Just a quick question.. If ccTuition is anything but tuition, that is when
the code should run?


Yes. If ccTuition <> Tuition, it should be true. If they are equal (which
they were), it should return false.
Jul 26 '05 #15
>
What are TypeName(ccTuit ion) and TypeName(tuitio n), respectively?
http://msdn.microsoft.com/library/en...cttypename.asp


I didn't even get that far, nor did I need to. When 12 <> 12 returned True,
I felt my grasp on logic slip away and I posted my message. This code was
also working since day one, it just started today to freak out.
Jul 26 '05 #16
I wanted to reply again since I was curious myself: Here's as simple view:

Response.Write( ccTuition & "<br>")
Response.Write( total & "<br>")
Response.Write( TypeName(ccTuit ion) & "<br>")
Response.Write( TypeName(total) & "<br>")
Response.Write( ccTuition <> total & "<br>")
'and my favorite!
Response.Write( 12 <> 12)

The output is:

2238
2238
Single
Single
True
True

<sigh>
Jul 26 '05 #17
Jordan wrote:
What are TypeName(ccTuit ion) and TypeName(tuitio n), respectively?
http://msdn.microsoft.com/library/en...cttypename.asp


I didn't even get that far, nor did I need to. When 12 <> 12 returned
True, I felt my grasp on logic slip away and I posted my message.
This code was also working since day one, it just started today to
freak out.


Why don't you answer the question?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 26 '05 #18
Just a thought: How does this behave:
If Not (CSng(ccTuition ) = tuition) Then
"Jordan" <jf*****@learn. colostate.edu> wrote in message
news:uE******** ******@TK2MSFTN GP09.phx.gbl...
Let me just start by saying I'm a very accomplished ASP programmer. I need
to rely on that becuase this error boggles the mind.

Just today, I had to troubleshoot an error in one of my applications and I
tracked it down to a single condition statement. Here it is (very complex
code to follow):

<code>

If (CSng(ccTuition ) <> tuition) Then

</code>

Again, just today, this line started to disfunction. I validated the values and they're 100% accurate. I use singles to account for decimals. I began
trying different combinations, using CDbl and other conversions. Nothing
worked. Then (and this is the best part), I tried: If (12 = 12) Then...and IT FAILED!!!!

I can't even begin to fathom this issue, not only does the condition not
validate, but it just started happening out of the blue. I've since changed my statement to a string comparison becuase nothing else was working.

I'm going to lunch, boggled as ever.

Jul 26 '05 #19
Well, a server reboot last night has re(solved) the issue. At the very
least, I can move on...

thanks for all the responses, j
Jul 27 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1699
by: Yeongja_Choi | last post by:
How Dare Could America Industrial Property Office Be In Conspiracy With Jungang International Patent Office To Make An Extravagant International Crime ? Currently a Korean party now holds the American patent 4919933, the Taiwanese patent 37414, the Japanese patent 2733523 and a Korean patent 044435 through The Korean Jungang International Patent Law Office(Address : 5th Floor, Jae Insurance Bld, #80, Susong-Dong, Jongro-Gu, Seoul, the...
10
2170
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a second. What would cause this? Is it some kind of postgresql.conf configuration failure? I have the same query running fine on a different machine. QUERY PLAN...
14
20396
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables EXPLAIN_STATEMENT and EXPLAIN_INSTANCE exist. With VESAMPL.DDL, I loaded the predefined execution plans. In the next step, I'ld like to display the loaded access plans. So, I right clicked on "Show Explained Statements History" and got the result:
10
2159
by: Jeff Boes | last post by:
I'm hoping there's someone here with experience in building the Visual Explain tool from Red Hat. I downloaded it and the J2 SDK, but when I attempt to follow the build instructions, I get messages like: error: Type `JTableHeader' not found in the declaration of the local variable `header'. JTableHeader header = null; To me, this indicates that the SDK isn't installed (properly). But I admit I'm pretty much a Java...
5
3636
by: Jon Lapham | last post by:
I have been using the EXPLAIN ANALYZE command to debug some performance bottlenecks in my database. In doing so, I have found an oddity (to me anyway). The "19ms" total runtime reported below actually takes 25 seconds on my computer (no other CPU intensive processes running). Is this normal for EXPLAIN ANALYZE to report a total runtime so vastly different from wall clock time? During the "explain ANALYZE delete from msgid;" the CPU is...
4
12729
by: marklawford | last post by:
Not having earned my DBA badge from the scouts just yet I'm a little lost with an error I'm getting. We've just upgraded our development database from 7.2 to 8.2 as the first step in upgrading our wider environment. Of course, development doesn't stop so I'm running some explain plans over some new views. The problem is, when the view is accessed as part of the explain plan script, the following error is returned.
22
1749
by: graham.parsons | last post by:
Guys, Hopefully someone can help. We have a monitoring program that has threads which start and stop monitoring at various times. There are two tables: THREADLIFECYCLE unique_id
118
6747
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI class where we had to use Lisp, and I absolutely hated it, having learned C++ a few years prior. They didn't teach Lisp at all and instead expected us to learn on our own. I wasn't aware I had to uproot my thought process to "get" it and wound up feeling like a moron. In learning Python I've...
5
8109
by: kabotnet | last post by:
Hi, I'm new in db2, I'm trying to execute EXPLAIN command on some queries but i have error like: And message similar to: Token EXPLAIN is not valid, valid tokens ( END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER. I've created tables explain_* How can I start to find solution? Is it possible that my db2 doesn't support explain?
1
3582
by: w.l.fischer | last post by:
Hi, the following sequence: set current explain mode yes; set current explain snapshot yes; update ...; set current explain mode no;
0
9647
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
9489
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,...
0
10356
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...
0
10162
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 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...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
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
5396
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...
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
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.