Why multiple statements, why not single statements?

Ade

-----Original Message-----
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: 22 January 2006 01:08
To: CF-Talk
Subject: Re: Update, Delete, Insert recordcount?


Also always a good idea to use SET NOCOUNT around multiple SQL
statements to suppress informational messages...
<cfquery name="yourQuery" datesource="yourDS">
SET NOCOUNT ON

UPDATE yourTable
SET YourColumn = 'Something'

SELECT @@ROWCOUNT  AS RowsUpdated

SET NOCOUNT OFF
</cfquery>


On 1/21/06, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> My name's not Bobby, but here goes:
>
> <cfquery name="yourQuery" datesource="yourDS">
>         UPDATE yourTable
>         SET YourColumn = 'Something'
>
>         SELECT @@ROWCOUNT 'RowsUpdated'
> </cfquery>
>
> <cfoutput>
>         #yourQuery.RowsUpdated#
> </cfoutput>
>
> Untested, and for SQL Server, but might be ok for Access.
>
> Adrian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230188
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to