Hmm...you're right, I'll remove the single quotes around CatID, UserID, and Price. I'm using JS validation that removes all non-numeric data from the Price field, but maybe they have JS turned off?
>Are any of your columns numeric? I would think that CatID, UserID, and Price >should be numeric columns, but your query treats them as strings. My guess >would be that a price is getting submitted with non-numeric data. (dollar >sign, commas, letters?) > >The line number in the error detail may not necessarily be the line that is >actually causing the error when it comes to a cfquery tag. > > >I have a site that allows people to list items for sell. I keep getting >errors emailed to me that state, " Error Executing Database Query. >[Macromedia][SQLServer JDBC Driver][SQLServer]Error converting data type >varchar to numeric. <br>The error occurred on line 30." > >Here is my query: > > <cfquery name="Name" datasource="DB"> > SET NOCOUNT ON; > INSERT INTO Products (CatID, UserID, Designer, Model, Color, DressSize, >Price, Material, Description, Status) > VALUES ('#Trim(FORM.CatID)#', > '#Trim(SESSION.Auth.UserID)#', > '#Trim(FORM.Designer)#', > '#Trim(FORM.Model)#', > '#Trim(FORM.Color)#', > '#Trim(FORM.DressSize)#', > '#Trim(FORM.Price)#', > '#Trim(FORM.Material)#', > '#Trim(FORM.Description)#', > 'Approved'); > SELECT @@identity AS ProdID FROM Products; > </cfquery> > >Line 30 is the #Trim(FORM.Description)# line in the query, but the >Description field IS set to varchar. Any ideas on why I'd be getting this >error? I can't seem to reproduce it, but several of my users are >consistently triggering the error. > >Thanks >Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298271 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4