(I made this question a bit shorter !!)

Hi guys,

I am getting a strange error, below is a function that adds a cutomers
details to a table....

<cffunction name="add" output="false" access="public"
returntype="numeric">
        ...
        <cfargument name="updates" type="boolean" required="true">
        
        <!--- insert customer --->
    <cfquery name="insertInfo" datasource="#Request.App.dsn#"
password="#Request.App.DBpassword#" username="#Request.App.DBusername#">
        INSERT INTO address_book 
                (...
customer_updates)
                VALUES (
                ...,
                <cfqueryparam cfsqltype="cf_sql_bit"
value="#arguments.updates#">
                ) SELECT @@IDENTITY AS 'customer_id'
    </cfquery>
        
        <cfreturn insertInfo.customer_id/>
        
  </cffunction>

The error I am getting is...

[Macromedia][SQLServer JDBC Driver][SQLServer]String or binary data
would be truncated. It is highlighting 

<cfqueryparam cfsqltype="cf_sql_bit" value="#arguments.updates#"> ??

Now if the cfargument passes the variable ok, then why would the db
throw an error?

The column customer_updates is set to datatype = bit.

Any help would be appreciated.

mike





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224134
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to