473,387 Members | 1,812 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,387 software developers and data experts.

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 #1
19 1430
Did you actually put literally "if 12 = 12", or did you set the values of
your two variables both to 12?

I would try puting cSng around tuition as well, just to be absolutely sure
it's not being sneaky on you there...
If (CSng(ccTuition) <> CSng(tuition)) Then

If that fails, reboot. :)

Beverley
"Jordan" <jf*****@learn.colostate.edu> wrote in message
news:uE**************@TK2MSFTNGP09.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 #2
> Then (and this is the best part), I tried: If (12 = 12) Then...and > IT
FAILED!!!!


Did you copy and paste these values from another source?

If so, it is possible that there are non-printing characters that VBScript
can see and that you cannot.

If not, there are ghosts in your machine. I cannot find a way to make ASP
evaluate (12 = 12) to false.
Jul 26 '05 #3
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**************@TK2MSFTNGP09.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 #4
Both actually. And I did try the CSng around both variables. All failed.

I might have to reboot, for lack of any else to do.

Thanks, j
"Beverley" <al**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Did you actually put literally "if 12 = 12", or did you set the values of
your two variables both to 12?

I would try puting cSng around tuition as well, just to be absolutely sure
it's not being sneaky on you there...
If (CSng(ccTuition) <> CSng(tuition)) Then

If that fails, reboot. :)

Beverley
"Jordan" <jf*****@learn.colostate.edu> wrote in message
news:uE**************@TK2MSFTNGP09.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 #5
No I didn't, and it shouldn't be non-printing characters. I deleted,
re-typed, re-typed from scratch, etc.

Honestly, I tried everything (that I can think of at least) to understand
what could possibly be wrong.

Thanks, j

"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Then (and this is the best part), I tried: If (12 = 12) Then...and > IT
FAILED!!!!


Did you copy and paste these values from another source?

If so, it is possible that there are non-printing characters that VBScript
can see and that you cannot.

If not, there are ghosts in your machine. I cannot find a way to make ASP
evaluate (12 = 12) to false.

Jul 26 '05 #6
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****************@TK2MSFTNGP15.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**************@TK2MSFTNGP09.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 #7
Re-install windows!

Jul 26 '05 #8
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**************@TK2MSFTNGP09.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****************@TK2MSFTNGP15.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**************@TK2MSFTNGP09.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 #9
!TG
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>

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.

Just a quick question.. If ccTuition is anything but tuition, that is
when the code should run?
Jul 26 '05 #10
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(ccTuition) and TypeName(tuition), 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.googlegr oups.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**************@TK2MSFTNGP14.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**************@TK2MSFTNGP09.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****************@TK2MSFTNGP15.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**************@TK2MSFTNGP09.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(ccTuition) and TypeName(tuition), 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(ccTuition) & "<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(ccTuition) and TypeName(tuition), 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**************@TK2MSFTNGP09.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
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...
10
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...
14
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...
10
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...
5
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...
4
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...
22
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
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...
5
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...
1
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
0
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,...
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...

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.