Learn how to a build a cloud-first strategyRegister Now


Coldfusion MX  CFSQLTYPE

Posted on 2006-05-08
Medium Priority
Last Modified: 2013-12-20
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?
Question by:jramos74
  • 2
LVL 12

Accepted Solution

mkishline earned 1000 total points
ID: 16633285
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.
LVL 25

Expert Comment

ID: 16633327
It sounds like the value being passed is non numeric
display it outside the query to see what it is.
LVL 25

Expert Comment

ID: 16633345
sorry mkishline
I didn't see that you posted before I pointed out the non numeric

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 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