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 page provides documentation for the \u003ccode\u003eSpannerBatchNonQueryException\u003c/code\u003e class, which handles errors during batch non-query operations in the Spanner database.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSpannerBatchNonQueryException\u003c/code\u003e class inherits from \u003ccode\u003eSpannerException\u003c/code\u003e and implements \u003ccode\u003eISerializable\u003c/code\u003e, indicating it's a specialized type of exception that can be serialized.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties inherited from \u003ccode\u003eSpannerException\u003c/code\u003e, such as \u003ccode\u003eErrorCode\u003c/code\u003e, \u003ccode\u003eIsRetryable\u003c/code\u003e, and \u003ccode\u003eRecommendedRetryDelay\u003c/code\u003e, as well as the \u003ccode\u003eSuccessfulCommandResults\u003c/code\u003e property specific to batch operations.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation explains that in Spanner, batch commands execute sequentially, and if one command fails, subsequent commands will not run; this exception reports the failure.\u003c/p\u003e\n"],["\u003cp\u003eThis class is found in the \u003ccode\u003eGoogle.Cloud.Spanner.Data\u003c/code\u003e namespace and within the \u003ccode\u003eGoogle.Cloud.Spanner.Data.dll\u003c/code\u003e assembly, with the most current stable release of version 4.6.0 and a latest beta version of 5.0.0-beta05.\u003c/p\u003e\n"]]],[],null,[]]