cfinsert and cfupdate only work from a POST operation. You need to get the
data there somehow, and CF needs to know what fields are involved. With
cfupdate, you must pass the unique ID for that table (eg, UserID). For
cfinsert (and cfupdate) you can only pass form fields that are existing
fields in the table (eg, form.userFirstName = dbo.myTable.userFirstName). If
you name a submit button, CFINSERT and CFUPDATE require a third argument:
formfields:
cfinsert table="myTable" datasource="#myDSN#" formfields="userFirstName,
userLastName, ...)
leaving out the button form element name.
If you pass the data in the URL, you can use SQL:
insert into myTable (fieldname1, fieldname2, ...)
VALUES (#url.value1#, #url.value2#, ...)
HTH,
Jeff
-----Original Message-----
From: Parker, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 19, 2000 8:00 PM
To: CF Talk (E-mail)
Subject: Blatantly simple
I'm sure this is one of those blatantly simple problems where I'm
overlooking something simple but for the life of me I can't see the
<CF_WOODS_FOR_THE TREES>.
I'm trying to get a database to update from the execution of a link from a
page on our non-CF server that goes via our CF server using this template,
and then back to the non-CF sever. I've tried INSERT INTO and CFUPDATE and
the variation below but none of them update the database - the CFLOCATION
bit does execute OK. There are two other fields in the table, an AutoNumber
field and a DateTime field which has a default value of DATE()+TIME(). Can
this only be achieved coming from a POST?
<CFSET PageName = "Work To Live">
<!--- Update the database --->
<cfinsert datasource="wc_general"
tablename="CorpPlan"
dbtype="ODBC"
formfields="PageName">
<!--- Now relocate the user to the correct page --->
<CFLOCATION url="http://www.workcover.com/worktolive/worktolive.html"
addtoken="No">
********************************
Kevin Parker
Service and Communication
WorkCover Corporation
[EMAIL PROTECTED]
ph: +61 8 82332548
fax: +61 8 82332000
********************************
****************************************************************************
This e-mail is intended for the use of the addressee only. It may contain
information that is protected by legislated confidentiality and/or is
legally privileged. If you are not the intended recipient you are prohibited
from disseminating, distributing or copying this e-mail. Any opinion
expressed in this e-mail may not necessarily be that of the WorkCover
Corporation of South Australia. Although precautions have been taken, the
sender cannot warrant that this e-mail or any files transmitted with it are
free of viruses or any other defect.
If you have received this e-mail in error, please notify the sender
immediately by return e-mail and destroy the original e-mail and any copies.
****************************************************************************
----------------------------------------------------------------------------
--
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.