Send feedback on this topic.
Teradata.Client.Provider
RecordsAffected64 Property



Teradata.Client.Provider Namespace > TdDataReader Class : RecordsAffected64 Property
Gets the number of rows changed, inserted, deleted or updated by execution of the SQL statement.
Syntax
'Declaration
 
Public ReadOnly Property RecordsAffected64 As Long
'Usage
 
Dim instance As TdDataReader
Dim value As Long
 
value = instance.RecordsAffected64
public long RecordsAffected64 {get;}
public:
property int64 RecordsAffected64 {
   int64 get();
}
Remarks

The records affected is cumulative. For example, if a request contains two insert statements the RecordsAffected will be 2.

A -1 will be returned for statements that are not DELETE, INSERT, or UPDATE.

If the number of rows affected is less than Int32.MaxValue, both RecordsAffected and RecordsAffected64 properties will return the same value.

If the number of rows affected from the execution of the SQL statements overflows Int64.MaxValue, Int64.MaxValue value will be returned. The provider will post an event to TdConnection.InfoMessage when an overflow condition occurs. The event will include a warning code and message. The warning message will have the actual number of records affected. The message code is 114004 and the message text is "An overflow occurred while calculating the number of records affected, actual value is [RecordsAffected]"

NOTE: In order for an application to be aware that an overflow occurred, it must register for the callback with TdConnection.InfoMessage event. Refer to TdDataReader.RecordsAffected for an example.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdDataReader Class
TdDataReader Members