The query looked exactly as I posted (below). It has to have
CFQUERY tags around it, of course. No ;'s needed. The "set nocount on"
is the key. Multiple statements will run without that but you will
have a hard time getting anything back.

RPS

At 10:19 1/11/01 -0500, you wrote:
>what did your CFQUERY look like?  did you use ;'s between statements?  i was
>playing around with cramming multiple statements in one CFQUERY, and could
>never get the darn things to work correctly.
>
>chris olive, cio
>cresco technologies
>[EMAIL PROTECTED]
>http://www.crescotech.com
>
>
>
>-----Original Message-----
>From: Ryan [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 11, 2001 9:14 AM
>To: CF-Talk
>Subject: RE: Can't you use qry.RecordCount when doing an update?
>
>
>At 10:46 1/11/01 -0000, you wrote:
>>No.
>>
>>Unfortunately RecordCount is only set by SELECT,
>>not by UPDATE, INSERT or DELETE.
>
>Here is what I ended up doing, in case anyone else ever has the same
>problem.
>
>SET nocount ON
>UPDATE site SET password = <CFQUERYPARAM
>VALUE="#Hash(Attributes.password1)#">
>WHERE siteid = #Client.siteid# AND
>password = <CFQUERYPARAM VALUE="#Hash(Attributes.oldpassword)#">
>SELECT @@ROWCOUNT as affectedrows
>SET nocount OFF
>
>Then I can reference qryname.affectedrows and see if a record was actually
>updated.
>
>RPS
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to