473,671 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

the value cannot be converted to a number

13 New Member
what can be the problem? Since i tried to write this values like:

Expand|Select|Wrap|Line Numbers
  1. <cfset totResponse = #GETTOTSCORE1.a# + #GETTOTSCORE2.b# + #GETTOTSCORE3.c#>
  2. <cfset avg = #GetSum1.score1# + #GetSum2.score2# + #GetSum3.score3#>
  3. <cfset totAVG = avg / #totResponse#>
first calculation to calculate total response and I got error in value #GETTOTSCORE3.c #
In my oracle the value for #GETTOTSCORE3.c # is 0 and at the website also display 0 in table

but when I do a calculation for totResponse, it get error for this
Expand|Select|Wrap|Line Numbers
  1. <---<cfset totResponse = #GETTOTSCORE1.a# + #GETTOTSCORE2.b# + #GETTOTSCORE3.c#>--->
  2.  
I think the value for #GETTOTSCORE3.c #> need to converted into 0.
How can I fix this?
tq.. :)
Feb 20 '13 #1
4 10869
acoder
16,027 Recognized Expert Moderator MVP
Use the val() function.

If that doesn't work, please post your query for GETTOTSCORE3.
Feb 20 '13 #2
jsungmin
13 New Member
i'm sorry, how to use function val() ? can you give an example? I'm really new in coldfusion
and here the query for GETTOTSCORE3.

Expand|Select|Wrap|Line Numbers
  1. <cfquery name="GETTOTSCORE3" datasource="#ds#">
  2.         select count(s.quest_score) as c
  3.         from survey_customer_score s, survey_customer_header h
  4.         where s.quest_score = 3
  5.         and s.survey_id = 1757        
  6.         and s.quest_id = 1759        
  7.         and s.cust_id = h.cust_id
  8.     </cfquery>
this query is to count score3.
value score for score3 is 0 in oracle but in coldfusion it can't define the value score3 as 0.
But now I want to know how to convert score3 into 0 in coldfusion by using function val()

tq :)
Feb 21 '13 #3
acoder
16,027 Recognized Expert Moderator MVP
Just put it around your variables - see docs.

PS. please use [code] tags around your code.
Feb 21 '13 #4
jsungmin
13 New Member
tq for helping me :)
Feb 21 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
11815
by: Jeff Thies | last post by:
I'm trying to test if a value is a number. I thought I could do this: var test='not_a_number'; var test2='4.00'; num_test=parseFloat(test); if(num_test == 'NaN'){alert('that was not a number')}
2
58013
by: Chris Herring | last post by:
Hi there: Well, let me start off by saying that I am a Visual Studio drag and drop weenie, not a real programmer. So I tend to get confused when things do not look like the instructions said they were going to look :) . Here is my current dilemma: I am having a strange problem with my ASP.NET application. I am building the application using Visual Basic .Net in Visual Studio.NET 2003. Lately, I have frequently been getting the following...
1
2223
by: Jim | last post by:
I am experiancing a problem filling a dataset. I am getting a Value cannot be null exception and can't figure out why. Here is the code what the heck could be going on? Dim conn As New SqlConnection(ConnectionString) Dim adapter As New SqlDataAdapter strSQL = "SELECT * FROM ChiefComplaints" adapter.SelectCommand = New SqlCommand(strSQL, conn) adapter.Fill(dataSet)
2
4185
by: Stephan Walter | last post by:
Hi, I'm hacking on a LISP interpreter in JS , and running into trouble with numbers and Number objects. This is what I have: var a = new Number(1); var b = a; document.writeln(a == b); // true
1
5721
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be null'. When the extension attribute is not applied it runs fine. The wierd thing is that it does not appear to be an error within the SOAP extension because I break-pointed it and when the proxy function gets called the SOAP extension runs fine....
1
16944
by: Sanjay Godbole | last post by:
Hi, I am getting following error while executing the axpx page. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentNullException: Value
3
6434
by: Paul | last post by:
Hi, I'm new to .NET and I'm trying to run through the tutorial "Creating a Web Application Using VB" As I follow the directions, It seems to work just fine. I can preview the data from the SQLDataAdapter but when I try to view the data in the browser I get the error:
2
14740
by: paul.dunstone | last post by:
HI all I am using msbuild to compile my web application project. After building the solution I get the following error message: Server Error in '/Community' Application. -------------------------------------------------------------------------------- Value cannot be null.
0
9832
by: pankajprakash | last post by:
Hi all I am using the Ajax control toolkit and want to the fill the gridview but at the time of rendering it occurs the error "Sys.ArgumentNullException: Value cannot be null. Parameter name: element". Here am posting the whole .ascx page. Will you please let me know how can i remove this error.
1
3372
by: kwokv616 | last post by:
I'm currently working on a project to convert a Foxpro database into Access. How do I lookup a cell value (given row number and column number) and return it to a variable? This is what I want to do: temp = table(row_number,column_number) I've searched through the internet and tried various methods and still cannot do it =( Please Help!! Many thanks!!
0
8476
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
8821
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
8670
tracyyun
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...
0
7437
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...
1
6229
isladogs
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...
0
5696
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
4225
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...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.