As a die hard SQL programmer I never use CF to take care of the database
stuff. I leave that to the database (makes sense to me) In fact, when
using SQL, I hardly ever use CFQuery as I always use CFSTOREDPROC as you
will see improved performance.
However I wouldn't say never to use CFINSERT and CFUPDATE. If you want to
run Basic sql queries that simply take a bunch of form values and insert
them into a table then CFINSERT would work ok. It is particularly useful if
you have a lot of fields to insert into as you aren't required to list them.
However if you need to do more complex stuff in your SQL statement (like
insert the results of a select statement, or manipulate the form values
before inserting them) then you will have to use INSERT instead of CFINSERT.
The same argument applies to CFUPDATE vs UPDATE but i addition you are only
able to update one row in a table using CFUPDATE.
I can understand why some people say never to use CFINSERT or CFUPDATE as
you are asking CF to generate the SQL for you and this is taking the owness
off of the DB. But in my view if you are only doing something very small
and simple then the CF commands are of use.
------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.co.uk/
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 419 4235
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
-----Original Message-----
From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
Sent: 13 November 2000 04:06
To: CF-Talk
Subject: CFUPDATE and CFINSERT
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C04CFD.14A3F460
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hey Guys:
I've herd some people say NEVER to use CFUPDATE and CFINSERT. Is this =
true and if so why....or when should I use the cf commands and when =
should I use SQL?
Thanx,
Greg Wolfinger
------=_NextPart_000_000D_01C04CFD.14A3F460
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hey Guys:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I've herd some people say NEVER to use =
CFUPDATE and=20
CFINSERT. Is this true and if so why....or when should I use the =
cf=20
commands and when should I use SQL?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanx,</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Greg =
Wolfinger</FONT></DIV></BODY></HTML>
------=_NextPart_000_000D_01C04CFD.14A3F460--
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]