Don't know what database you are using but I would try the following:
1.    Include "form." in the variable name to assure there is no name
conflict.
2.    Test for empty strings.

    I have found in some db's there is inconsistant behavior where an empty
field will cause a problem in some cases and not in others. So I always test
for empty fields. For example:

<cfquery name="AddUser" datasource="NOW">
INSERT INTO Users
(<cfif Trim(form.First) IS NOT "">First,</cfif> ....)
VALUES
(<cfif Trim(form.First) IS NOT "">'#First#',</cfif>... )
</cfquery>


Marc Stormes
Relocate-US.com, LLC


----- Original Message -----
From: "Jeremy Toevs" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, November 03, 2000 11:13 AM
Subject: cfinsert


I was using the following query:

<cfquery name="AddUser" datasource="NOW">
INSERT INTO Users
(First,Last,Ride,Fav_Place)
VALUES('#First#','#Last#','#Ride#','#Fav_Place#')
</cfquery>

But it was giving me an error. None of the fields are numeric, they are all
texted fields. But when I used the following query:

<cfinsert tablename="Users" datasource="NOW">

This one worked, but why didn't they other one?

Jeremy

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=sts or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to