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

  • Home
  • SEARCH
  • 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 6346049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:56:37+00:00 2026-05-24T20:56:37+00:00

I have a utility which: grabs sql commands from a flat text file executes

  • 0

I have a utility which:

  1. grabs sql commands from a flat text file
  2. executes them sequentially against SQL Server located on the same machine
  3. and reports an error if an UPDATE command affects ZERO ROWS (there should never be an update command in this file that doesn’t affect a record, hence it being recorded as an error)

The utility also logs any failed commands.

Yet the final data in the database seems to be wrong/stale, even though my utility is reporting no failed updates and no failed commands.

I know the first and most obvious culprit is some kind of logic or runtime error in my programming of the utility itself, but I just need to know of it’s THEORETICALLY possible for SQL Server to report that at least one row was affected and yet no apply the change.

If it helps, the utility always seems to correctly execute the same number of commands and the final stale/wrong data is always the same i.e. it seems to correctly execute a certain number of commands that are being successfully queried against the database, then failing.

Thanks.

EDIT:

I should also note that this utility is exhibiting this behavior across 4 different production servers each with their own dedicated local database server, and that these are beefy machines with 8-16 GB RAM each that are managed by a professional sysadmin.

  • 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-24T20:56:38+00:00Added an answer on May 24, 2026 at 8:56 pm

    Based on what you say…

    It is possible for the “xx rows affected” to be misleading if you have a trigger firing. You may be reading the count from the trigger. If so, add SET NOCOUNT ON to the trigger

    Alternatively, the data is the same, so you actually do dummy update with the same values. Add a WHERE clause to test for differences for example.

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

Sidebar

Related Questions

In linux, we have a utility called file, which helps us to determine the
I have a program which runs an external, command line utility and reads the
I have small utility that does some processing on a file and changes the
I have a utility build script that gets called from a variety of project-specific
we're building a cross-platform utility which must have a small footprint. We've been pulling
I am writing a utility which accepts either a filename, or reads from stdin.
I have a tiny command line utility which reads user input and adds all
I developed a command-line utility which needs to be called from a Java GUI
I have to make a newsletter sending utility application which will collect the list
Okay, so we have a utility here in-house that generates business-model classes from our

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.