Your query says that NONE of your data types are numeric. Is that true?

Ps... Every time you take data directly from forms and pass it to your
database without cleaning it... god kills a kitten. Please save the kittens
and use cfqueryparam.

..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com




-----Original Message-----
From: Rick King [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 3:39 PM
To: CF-Talk
Subject: Error on site - "Error converting data type varchar to numeric"

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:298276
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to