Re: Cannot convert to number.
On 1/13/03, Jillian Carroll penned: I am having a really weird problem... I do some calculations in CF, they work on my development machine (Windows XP Home/Apache) but when I upload them to my host (Windows 2000/IIS) they don't work. I get this error... anybody able to help me on this one? *** *** *** snip !--- Next/Previous Logic Start --- !--- Set the number of records to display on each page. --- CFSET OnEachPage = #toolsviewnum# !--- Set the default startrow to 1 if a value was not passed. --- !--- Determine whether or not to show the previous or next links. --- CFPARAM NAME = StartRow DEFAULT = 1 !--- Set the value of endrow to the maxrows + startrow - 1 --- CFSET EndRow = StartRow + OnEachPage - 1 The first thing I'd check is what the value of toolsviewnum is. If it's blank, then that will cause the error. I couldn't see from your code where that value is being set. If that value is being pulled from a database, that may be why it works on the dev box and not on the host's server. Maybe the data is different in the test database. :) -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
No, but better safe than sorry. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:32 AM To: CF-Talk Subject: RE: Cannot convert to number. why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
And as long as you can get a script on the server, can get a list of the DSN's Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:38 AM To: CF-Talk Subject: RE: Cannot convert to number. No, but better safe than sorry. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:32 AM To: CF-Talk Subject: RE: Cannot convert to number. why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
I would have though you would need registry access? or object access? -Original Message- From: Robert Bailey [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:45 To: CF-Talk Subject: RE: Cannot convert to number. And as long as you can get a script on the server, can get a list of the DSN's Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:38 AM To: CF-Talk Subject: RE: Cannot convert to number. No, but better safe than sorry. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:32 AM To: CF-Talk Subject: RE: Cannot convert to number. why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
Yeah, would need to call an object. Not much for navigating the registry, though I am sure you can do it that way as well Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:43 AM To: CF-Talk Subject: RE: Cannot convert to number. I would have though you would need registry access? or object access? -Original Message- From: Robert Bailey [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:45 To: CF-Talk Subject: RE: Cannot convert to number. And as long as you can get a script on the server, can get a list of the DSN's Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:38 AM To: CF-Talk Subject: RE: Cannot convert to number. No, but better safe than sorry. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:32 AM To: CF-Talk Subject: RE: Cannot convert to number. why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot convert to number.
yeah, but both of these functions can be disabled via the CFAS IDE -Original Message- From: Robert Bailey [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:53 To: CF-Talk Subject: RE: Cannot convert to number. Yeah, would need to call an object. Not much for navigating the registry, though I am sure you can do it that way as well Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:43 AM To: CF-Talk Subject: RE: Cannot convert to number. I would have though you would need registry access? or object access? -Original Message- From: Robert Bailey [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:45 To: CF-Talk Subject: RE: Cannot convert to number. And as long as you can get a script on the server, can get a list of the DSN's Robert Bailey [EMAIL PROTECTED] Famous for nothing! http://www.tinetics.com -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:38 AM To: CF-Talk Subject: RE: Cannot convert to number. No, but better safe than sorry. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:32 AM To: CF-Talk Subject: RE: Cannot convert to number. why? do you know the DSN...? -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:28 To: CF-Talk Subject: RE: Cannot convert to number. cfquery name=tools datasource=#dsn# username=jubilee password=cds337 Better change your password now. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cannot convert to number.
Yes, I have had similar errors. Its usually when your query does not return a numerical data where a number is expected. Check your database--specially the rows in numerical columns. Replacing null/empty numerical cells with 0 (zero) might solve your problem HTH Srimanta htttp://www.digitalshop.co.nz - Original Message - From: Jillian Carroll [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, January 12, 2003 10:15 PM Subject: Cannot convert to number. I am having a really weird problem... I do some calculations in CF, they work on my development machine (Windows XP Home/Apache) but when I upload them to my host (Windows 2000/IIS) they don't work. I get this error... anybody able to help me on this one? *** *** *** Error Diagnostic Information An error occurred while evaluating the expression: EndRow = StartRow + OnEachPage - 1 Error near line 39, column 8. Cannot convert to number. Please, check the ColdFusion manual for the allowed conversions between data types The error occurred while processing an element with a general identifier of (CFSET), occupying document position (39:2) to (39:43). Date/Time: 01/12/03 23:33:29 Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Remote Address: 207.195.97.118 *** *** *** My code is below: !--- QUERIES AND VARIABLE SETTING --- cfquery name=tools datasource=#dsn# username=jubilee password=cds337 SELECT jubileeid, globalnumber, nanumber, rotundanumber, binlocation, name FROM tools ORDER BY name ASC /cfquery !--- END QUERIES AND VARIABLE SETTING --- !--- Next/Previous Logic Start --- !--- Set the number of records to display on each page. --- CFSET OnEachPage = #toolsviewnum# !--- Set the default startrow to 1 if a value was not passed. --- !--- Determine whether or not to show the previous or next links. --- CFPARAM NAME = StartRow DEFAULT = 1 !--- Set the value of endrow to the maxrows + startrow - 1 --- CFSET EndRow = StartRow + OnEachPage - 1 !--- If the end row is greater than the recordcount, determine how many records are left. --- CFIF EndRow GTE tools.RecordCount CFSET EndRow = tools.RecordCount CFSET Next = false !--- Othereise, set Next to true and determine the next set of records. --- CFELSE CFSET Next = true CFIF EndRow + OnEachPage GT tools.RecordCount CFSET NextNum = tools.RecordCount - EndRow CFELSE CFSET NextNum = OnEachPage /CFIF CFSET NextStart = EndRow + 1 /CFIF !--- If StartRow is 1, set Previous to false. --- CFIF StartRow IS 1 CFSET Previous = false !--- Othewise, determine the previous set of records. --- CFELSE CFSET Previous = true CFSET PreviousStart = StartRow - OnEachPage /CFIF !--- Determine how many pages will be displayed. --- CFSET NumPages = Ceiling(tools.RecordCount / OnEachPage) CFPARAM NAME = PageNum DEFAULT = 1 !--- Next/Previous Logic End --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cannot convert to number
are there any limitations or exceptions to nesting #var#'s? Angel Stewart [EMAIL PROTECTED] on 11/19/2001 02:29:31 PM Please respond to [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] cc: Subject: Cannot convert to number OMG. I feel like its all coming apart now. Got hit with another error , on another screen. - An error occurred while evaluating the expression: SUM_#Evaluate(#attributes.attcode#)# = SUM_#attributes.attcode# + #GetVacationDetails.RegHrs# Error near line 106, column 9. Cannot convert SUM_8000 to number. Please, check the ColdFusion manual for the allowed conversions between data types - This is the line of code throwing the error: CFSET SUM_#Evaluate(#attributes.attcode#)# = #Evaluate(SUM_#Evaluate(#attributes.attcode#)#)# + #GetVacationDetails.RegHrs# It worked fine once..and...now it's not..and...it all doesn't make sense. *falls over* Gods. -Gel ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cannot convert to number
What are exactly are you trying to do? What result are you expecting? What's a typical value for attcode? -Original Message- From: Angel Stewart [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 15:30 To: CF-Talk Subject: Cannot convert to number OMG. I feel like its all coming apart now. Got hit with another error , on another screen. - An error occurred while evaluating the expression: SUM_#Evaluate(#attributes.attcode#)# = SUM_#attributes.attcode# + #GetVacationDetails.RegHrs# Error near line 106, column 9. Cannot convert SUM_8000 to number. Please, check the ColdFusion manual for the allowed conversions between data types - This is the line of code throwing the error: CFSET SUM_#Evaluate(#attributes.attcode#)#= #Evaluate(SUM_#Evaluate(#attributes.attcode#)#)# + #GetVacationDetails.RegHrs# It worked fine once..and...now it's not..and...it all doesn't make sense. *falls over* Gods. -Gel ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cannot convert to number
You can't use functions on the left-hand side of an assignment but this might help you: CFSET SUM_#attributes.attcode# = Evaluate(SUM_ attributes.attcode) + GetVacationDetails.RegHrs -Original Message- From: Angel Stewart [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 15:30 To: CF-Talk Subject: Cannot convert to number OMG. I feel like its all coming apart now. Got hit with another error , on another screen. - An error occurred while evaluating the expression: SUM_#Evaluate(#attributes.attcode#)# = SUM_#attributes.attcode# + #GetVacationDetails.RegHrs# Error near line 106, column 9. Cannot convert SUM_8000 to number. Please, check the ColdFusion manual for the allowed conversions between data types - This is the line of code throwing the error: CFSET SUM_#Evaluate(#attributes.attcode#)#= #Evaluate(SUM_#Evaluate(#attributes.attcode#)#)# + #GetVacationDetails.RegHrs# It worked fine once..and...now it's not..and...it all doesn't make sense. *falls over* Gods. -Gel ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists