Using sql update in asp - returning rows affected

Posted on 2008-11-12
Last Modified: 2012-05-05
Using the standard:

conn.Execute strSql to execute an update routine:

strSql = "Update dbo.Individual Set AppStatus = 'xxxx' Where AppStatus= 'Approved';"

Anyway, works fine, but is there a way to run this where I can get the number of rows affected?

Question by:akessel
    1 Comment
    LVL 9

    Accepted Solution

    Did you try:
    conn.Execute (strSql, iRecordsAffected )
    iRecordsAffected is the optional RecordsAffected parameter is a long variable in which the provider stores the number of records that were affected by the query

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now