How to determine number of records deleted in SQL DELETE query

P

PSI

I'm driving an access database (Jet4.0) from a C++ application. I
would like to exhibit the same behavior as Access when deleting
records - e.g. display a message box with "you are about to delete xxx
records ... ".

I was intending to wrap the delete query with a transaction so I could
rollback if the user wants to cancel the delete.

Is there a way to get the number of records deleted? Or do I need to
do a SELECT query first to determine record count and then do the
delete.

TIA
Frank
 
J

Joe Fallon

Access supports the RowsAffected property so you can do the delete first,
check rows affected and perform some other action there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top