Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:18:31+00:00 2026-05-23T07:18:31+00:00

I am using SQL Server database and after calling a simple SQL script I

  • 0

I am using SQL Server database and after calling a simple SQL script I would like to know how many records were affected by last (or only) executed statement in a script.

I cannot find the reference how to achieve this in Delphi’s TADOCommand and I know SQL Server gives this information to provider. I am aware of workarounds like getting @@ROWCOUNT in another query, yet this gives some overhead and unnecessary complexity.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:18:31+00:00Added an answer on May 23, 2026 at 7:18 am

    Do you use the

    function Execute(var RecordsAffected: Integer; const Parameters: OleVariant): _Recordset; 
    

    version of the Execute method?

    From the doc:

    RecordsAffected indicates the number
    of records, if the command operates on
    data, that are affected by the command
    after execution.

    So that should give you what you need.

    Disclaimer: I cannot test this against SQL Server (don’t have it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property
Using Microsoft SQL Server's database mirroring capability, can the mirroring occur between two clusters?
Today we're using a shared SQL Server database and that is perfect as I
When communicating to a SQL Server database using one of the typical systems, ODBC,
I'm using SQL Server 2008. My database is almost 2GB in size. 90% of
How do you restore a database backup using SQL Server 2005 over the network?
I'm using an Xml field in my Sql Server database table. I'm trying to
We're replicating a database between London and Hong Kong using SQL Server 2005 Merge
I'm trying to drop a SQL Server database using the following code: SqlCommand command
Using MS SQL Server Management Studio 2005 - To Restore a Database: Restore Database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.