DbDataAdapter.GetBatchedRecordsAffected Method

Returns information about an individual update attempt within a larger batched update.

Namespace: System.Data.Common
Assembly: System.Data (in system.data.dll)

protected virtual bool GetBatchedRecordsAffected (
	int commandIdentifier,
	out int recordsAffected,
	out Exception error
protected boolean GetBatchedRecordsAffected (
	int commandIdentifier, 
	/** @attribute OutAttribute() */ /** @ref */ int recordsAffected, 
	/** @attribute OutAttribute() */ /** @ref */ Exception error
Not applicable.



The zero-based column ordinal of the individual command within the batch.


The number of rows affected in the data store by the specified command within the batch.


An Exception thrown during execution of the specified command. Returns a null reference (Nothing in Visual Basic) (Nothing in Visual Basic) if no exception is thrown.

Data providers that support batched updating logic must override a series of virtual methods on the DbDataAdapter class. GetBatchedRecordsAffected represents one of those virtual methods. The DbDataAdapter class relies on GetBatchedRecordsAffected to determine the success or failure of individual update attempts within a batch so it can mark each corresponding DataRow accordingly.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

XNA Framework

Supported in: 1.0

Community Additions