• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Coldfusion MX CFSQLTYPE

My field (ie empid) is decalread as datatype number.  So I am using CFSQLTYPE: cfsqltype="cf_sql_integer" when I try to reference the data within my empid field.

I am getting the following error message:

Diagnostics: Invalid data D for CFSQLTYPE CF_SQL_INTEGER.
The error occurred on line 33.

To fix this I am switching the cf_sql_integer to cf_sql_varchar.  This will fix the issue.  Can anyone please explain why is this happening?
0
jramos74
Asked:
jramos74
  • 2
1 Solution
 
mkishlineCommented:
It appears that there were alphabetical characters in your decalread variable. CF_SQL_INTEGER expects only numbers and will convert a decimal to a whole number. CF_SQL_VARCHAR can handle any combination of alphanumeric characters and punctuation which is why making that change will fix your problem.
0
 
dgrafxCommented:
It sounds like the value being passed is non numeric
display it outside the query to see what it is.
0
 
dgrafxCommented:
sorry mkishline
I didn't see that you posted before I pointed out the non numeric
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now