How to detect how many records are updated??
I've the following codes in my program to update some records in a table, based on some conditions.
------------------------------------------------------------------------
sql = "update tbl_cust set dept_id = '" & dept_id_new & "' where dept_id = 'A'"
Set rs = conn.Execute(sql)
------------------------------------------------------------------------
I want to find out the number of records updated after executing the above command, is it possible? Or is there an alternative way of finding out the number of records updated??
Really desperate, please help, thanks in advance.
How to detect how many records are updated??
Quote:
Originally posted by Pickler
VB Code:
Dim Affected as Long
sql = "update tbl_cust set dept_id = '" & dept_id_new & "' where dept_id = 'A'"
conn.Execute sql,Affected
Debug.print Affected
Oh yes Pickler ! What you've recommended is exactly what I want!! Thank you so much.
Thanks to you too, SkinLab.