> > I have a SQL update. When it tries to update data a row 
> > that doesn't exist I don't get an error, I don't get 0 
> > rows, I get the query variable itself doesn't exist!?
> 
> A query can exist and contain no rows.
> RecordCount counts existing rows.
> If query has no rows - RecordCount is meaningless and
> will throw an error. Works every time.  :)
> 
> In your case - no rows were updated so RecordCount has 
> nothing to count and nothing != zero.

This isn't exactly the case. RecordCount returns the number of records
within the recordset returned by the database to CF. Whether or not the SQL
statement updates any rows, there won't be a recordset (and thus no "query"
in CF), unless the table that was updated has a trigger that returns a
recordset.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.

Reply via email to