In Spanner batched commands are executed sequentially in the order they are received.
If one command fails then the following commands won't be executed.
This exception contains the error code and error message corresponding to the command that failed.
It also contains the number of rows modified by each of the commands that executed successfully.
Properties
SuccessfulCommandResults
public IEnumerable<long> SuccessfulCommandResults { get; }
Returns the affected rows for each of the batch commands that executed succesfully.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eSpannerBatchNonQueryException\u003c/code\u003e class, which is used to handle errors during batch non-query operations in the Google Cloud Spanner database.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 5.0.0-beta05, with multiple previous versions listed, and version 4.2.0 serving as a reference point within the documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSpannerBatchNonQueryException\u003c/code\u003e inherits from \u003ccode\u003eSpannerException\u003c/code\u003e and implements \u003ccode\u003eISerializable\u003c/code\u003e, representing a specific type of error related to batch command failures.\u003c/p\u003e\n"],["\u003cp\u003eThis exception provides details on the failed command, including error code and message, and it also holds data on the number of rows modified by preceding commands that succeeded.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains a property called \u003ccode\u003eSuccessfulCommandResults\u003c/code\u003e, which includes an \u003ccode\u003eIEnumerable\u003c/code\u003e of type \u003ccode\u003eInt64\u003c/code\u003e that returns the affected row count for each of the successfully executed batch commands.\u003c/p\u003e\n"]]],[],null,[]]