Coldfusion MX  CFSQLTYPE

Posted on 2006-05-08
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
    LVL 12

    Accepted Solution

    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 24

    Expert Comment

    It sounds like the value being passed is non numeric
    display it outside the query to see what it is.
    LVL 24

    Expert Comment

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

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Article by: kevp75
    Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be Log into your Hosting account. IPage will be used for demonstration : Locat…
    The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

    754 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

    17 Experts available now in Live!

    Get 1:1 Help Now