Thanks very much everyone. I discovered that my routine for assessing the ID value needed an AND instead of an OR, so my empty string was sneaking through the "if" barricade. It seems temporarily subdued, so I'll let sleeping dogs lie. If it poses a problem again, I'll be sure to let you all know.
-Sam
----- Original Message -----
From: Cameron Childress
To: CF-Talk
Sent: Monday, December 01, 2003 3:46 PM
Subject: RE: value "" cannot convert to number
You've not included what you think the value of "ID" is, but if it's "" (an
empty string as the error indicates), then val() will return a zero - as it
does with any non-numeric value. Also, if it's an empty string, your math
operations *should* fail with the error you are giving as it's not a number
and math cannot be performed on it!
ID should be a number if you are planning on doing any math to it.
-Cameron
-----------------
Cameron Childress
Sumo Consulting Inc.
---
cell: 678-637-5072
aim: cameroncf
email: [EMAIL PROTECTED]
-----Original Message-----
From: Sam Fisher [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 12:32 PM
To: CF-Talk
Subject: value "" cannot convert to number
Hi Everyone,
Can someone tell be why I get a string convert error. I have tried
setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever
returns is either 0 or 1, respectively. Apparently ID is not getting
converted. "I feel like I'm taking crazy pills!" What is wrong with
converting a string to a number, especially when the string is just a
concatenation of numbers?
Many thanks,
Sam
The value "" cannot be converted to a number
155 : <CFOUTPUT>#ID#</CFOUTPUT>
156 : <CFSET ID=ID + 1>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- value "" cannot convert to number Sam Fisher
- Re: value "" cannot convert to numb... Charlie Griefer
- RE: value "" cannot convert to numb... Cameron Childress
- Re: value "" cannot convert to ... Sam Fisher
- Re: value "" cannot convert to numb... Terry Troxel
- Re: value "" cannot convert to numb... ilknur bodur
- CF Command Line brob
- RE: CF Command Line Raymond Camden
- re: value "" cannot convert to numb... Scott Brady
- RE: value "" cannot convert to numb... DURETTE, STEVEN J (AIT)
- Re: value "" cannot convert to numb... Scott Brady
- Re: value "" cannot convert to ... Charlie Griefer