If you are inserting, you need to change the query from UPDATE to INSERT
INTO:
INSERT INTO my_table (my_field)
VALUES ('form.txtTextArea')
If you are actually updating an existing record, you need to add the primary
key to the form, usually as a hidden field, so the UPDATE knows which record
to modify:
UPDATE my_table
SET my_field = '#Form.txtTextArea#'
WHERE my_key = #form.mykey#
Also, in the msg, your closing form tag is missing the '/' <grin>
Good luck!
Jeff
> -----Original Message-----
> From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 02, 2000 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: probs. inserting <textarea> into database
>
>
> I am trying to insert the contents of a <textarea> field into a database.
> It all seems really straight forward to me, but for some reason,
> I can't get
> it to work. It does everything except actually insert the data. I just
> don't get it. Anyone?
>
> ----- snip -----
>
> <form action="action_page.cfm" name="UpdateForm" method="post"
> enctype="multipart/form-data">
> <textarea name="txtTextArea" cols="60" rows="10"
> wrap="hard"><cfoutput>#My_Query.my_field#</cfoutput></textarea>
> <input type="Submit" name="Update_Button" value="Update">
> <form>
>
> ----- snip -----
>
> <CFIF IsDefined('Form.txtTextArea')>
> <CFQUERY datasource=#Session.DSN# name="My_Update_Query">
> UPDATE my_table
> SET my_field = '#Form.txtTextArea#'
> </CFQUERY>
> </CFIF>
>
> ----- snip -----
>
> .Todd
>
>
> ------------------------------------------------------------------
> ------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.