But why does CF not pick up the
Select @@RowCount as rowsaffected
Unless in is at the top of the CFQUERY ?
-----Original Message-----
From: Manner Jukka [mailto:[EMAIL PROTECTED]]
Sent: 01 December 2000 13:16
To: CF-Talk
Subject: RE: CF Does not like MSSQL7 @@ROWCOUNT
Use a trigger!
Enterprise Manager -> your database -> tables -> right click on top of any
table -> "Manage Triggers" and create a new trigger:
CREATE TRIGGER Insert_Images_Invoice_Index ON [dbo].[Images_Invoice_Index]
FOR INSERT
AS
BEGIN
SELECT rowsaffected = @@rowcount
END
- Jukka
-----Original Message-----
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 01, 2000 2:31 PM
To: CF-Talk
Subject: CF Does not like MSSQL7 @@ROWCOUNT
Dear All
I have the flowing CF Code
--- START -
<cfparam name="AddInvoices.RowsAffected" default="NOTSET">
<cfquery datasource="#DSNOperaDW#" name="AddInvoices">
INSERT INTO [Images_Invoice_Index]
(Invoice_ID, DirPath)
SELECT CSVTemp.Inv_ID,
CSVTemp.DIR
FROM Images_INVPROJECT_CSVTempTable as CSVTemp
WHERE (Doc_Type = 'I')
SELECT @@ROWCOUNT as RowsAffected
</cfquery>
<cfoutput>#AddInvoices.RowsAffected#</cfoutput>
-- END ---
Now my Output should be a number but I just get my default param back
NOTSET. If I run this query in MS Query Analyzer I will get the following
back
----- START ----
(8 row(s) affected)
RowsAffected
------------
8
------ END -------
Any body know why CF does not pick up the 8 and how I can get it to pick up
the 8
Thanks for your Time
Rif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists