Hmmm, that is weird this is the first time I have seen the error occur - up to today orders have been coming through fine ?
mike -----Original Message----- From: Marlon Moyer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 November 2005 9:48 a.m. To: CF-Talk Subject: Re: Truncated error my guess would be that it's trying to pass "true" or "false" as a string and not a 0 or 1. You might try to something like <cfset var updates = iif(arguments.updates,1,0)> Then use #updates# in your query. On 11/14/05, Mike | NZSolutions Ltd <[EMAIL PROTECTED]> wrote: > (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:224138 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

