Miriam,

First of all, you must have a field in your table that is unique.  An
AutoNumber is usually the most common, but you can have other different
methods of having a unique field.  For instance a user logon is unique.
Whatever field is your unique field, that will be the field that you narrow
your update statement on.

Your update statement could look something like this:

<CFQUERY NAME="Update" DATASOURCE="CF_Test" DBTYPE="ODBC">
UPDATE Table_Name
SET
 FIELD_NAME = '#FORM.Test_Data#',
 FIELD_DATE = '#varDate#',
WHERE
 USER_ID = '#passed_var#'
</CFQUERY>

The passed_var variable could be a URL variable, or anything that you choose
to narrow the update statement.  If you do not have a WHERE (condition)
statement in your Update, you will update every record in that table with
the new information.

I hope this is of some help to you.

-Jonathan
[EMAIL PROTECTED]

-----Original Message-----
From: Miriam Hirschman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 01, 2000 9:13 AM
To: CF Forum
Subject: Update Query


How can I specify which row in my table I want to update if the user has the
ability to change every field. Is there any way besides making an autoNumber
field? I have an Access DB.

Thanks,
 
     ---miriam

----------------------------------------------------------------------------
--
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.

Reply via email to