Solved

Error iin the Coldfusion Site

Posted on 2011-02-11
12
285 Views
Last Modified: 2012-05-11
I have one site which is giving me constant error in the page!

the Error code is: Invalid data 783ChromeHTML\Shell\Open\Command for CFSQLTYPE CF_SQL_NUMERIC.

i am getting it continously, if this is some kind of hacing, can anyone guide me or provide me some help in that regards
0
Comment
  • 6
  • 5
12 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 34873508

Do you have a cfqueryparam  statement in that area?
Or a function you're calling where you pass a value?

The variable in the value is not a number and needs to be.

Can you show the code in that area where the error is?


0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 34873941
i am using cfquery everywhere in my page,m but whay it is apssing like this
i do not know

is someone tampering with url
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34874032

If the variable is EMPTY, it is not a number and will throw the error

One way to fix it is to wrap val() around the variable you use in the cfqueryparam


   <cfqueryparam cfsqltype="CF_SQL_NUMERIC" value="#val(form.theNumber)#">

0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 34874063
but it will still throuw an error and email will come to me again
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34874133

Are you saying that you put in val() and it still throws an error?

Can you show the rest of the error, which shows which line it is on
and then show the code around that line ?

0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 34874241
Here is what i get!

Detail      [empty string]
ErrorCode      n/a
Message      Invalid data 157ChromeHTML\Shell\Open\Command for CFSQLTYPE CF_SQL_NUMERIC.
NativeErrorCode      0
SQLState      n/a

0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34874265

Why do I have to ask you the same question more than once?

Did you put in the val() ?

Can you show the code around that area..

0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 34874358
no i did not used val, ok here it is:

 WHERE
    request_ID = <cfqueryparam cfsqltype="cf_sql_numeric" value="#arguments.ID#">
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 125 total points
ID: 34874436
You can test to see if your ID is empty, by putting this just before the CFQUERY

<cfif arguments.ID is "">
  <cfthrow message="ID IS EMPTY">
</cfif>




> no i did not used val

why not?   I said that would fix it...


WHERE
    request_ID = <cfqueryparam cfsqltype="cf_sql_numeric" value="#val(arguments.ID)#">

or you can try this...

WHERE
    request_ID = <cfqueryparam cfsqltype="cf_sql_numeric" value="#arguments.ID#" NULL="#NOT len(arguments.ID)#">


0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 34874603
k its late here, i will try

but my question there are many such calls in thispag, all will need val and extra handling, and whenever user tries to pass something irrelavant to the url, it will throw an error and email me the same time

0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34874681

 cfqueryparam  tests to see if the VALUE is of that type.

 Unfortunately, cfqueryparam does not consider EMPTY (null)  to be a  NUMBER.

 So cfqueryparam will throw an error if the value is empty.  It seems this is the problem.  That arguments.ID is empty.

But, if you feel that the ID passed into your function should never be empty (null) then, you need to fix why it is empty and you will not have a problem.  

However, if it can be empty, then you need to handle it.   The two ways I showed above are commonly used to handle if the Value of cfqueryparam is empty.

Yes, in time that your value of cfqueryparam might be empty, you need to handle it in one of these ways, or there are a couple others...


0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
ID: 34877475
WHERE
    request_ID = <cfqueryparam cfsqltype="cf_sql_numeric" value="#arguments.ID#">


You are passing the argument ID to a function, check before passing the ID as argument to function call that it is NOT NULL...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Not seen Link button 5 37
show form submit button based on jquery sum 5 25
Coldfusion / Railo 4 -  datetimeFormat problem 3 24
PHP Form Calculate Total Price 10 40
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now