'Declaration Public Event InfoMessage As TdInfoMessageEventHandler
'Usage Dim instance As TdConnection Dim handler As TdInfoMessageEventHandler AddHandler instance.InfoMessage, handler
public event TdInfoMessageEventHandler InfoMessage
public: event TdInfoMessageEventHandler^ InfoMessage
The event handler receives an argument of type TdInfoMessageEventArgs containing data related to this event. The following TdInfoMessageEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Errors | Gets the collection of one or more TdError objects. |
Message | Get the warning message text. |
Number | Gets the warning number. |
Source | Indicates the source of the warning or informational message. |
Warnings that are generated by the Advanced SQL Engine during the execution of command and compilation warnings of stored procedures are exposed through the InfoMessage Event. An application can create a TdInfoMessageEventHandler to receive these warnings.
Default database change events are exposed through the InfoMessage Event. That is, the application can create a TdInfoMessageEventHandler to receive notification of default database change events.
Expired password warnings are exposed through the InfoMessage Event. Note that Password Expired connections are not compatible with Connection Pooling. ConnectionPooling will generate an error if the password is expired.
The Advanced SQL Engine returns the activity count as a 64 bit unsigned integer to the Data Provider. Some properties and methods return a 32 bit signed integer. This can cause an overflow condition to occur when one of the following methods and properties are used:
- TdCommand.ExecuteNonQuery
- TdDataReader.RecordsAffected
- TdDataReader.RecordsAffected64 (returns signed 64 bit integer)
- TdDataReader.RecordsReturned
- TdDataReader.RecordsReturned64 (returns signed 64 bit integer)
The provider will post an event to InfoMessage when an overflow condition occurs. The event will include a warning message and the actual activity count. An application can create a TdInfoMessageEventHandler to receive these data items.
If an overflow condition occurs when TdCommand.ExecuteNonQuery is used, a warning message with code 111002 and text "An overflow occurred while calculating the activity count, actual value is [ActivityCount
]" will be posted. Refer to TdCommand.ExecuteNonQuery for an example.
If an overflow condition occurs when TdDataReader.RecordsAffected or TdDataReader.RecordsAffected64 is used, a warning message with code 114004 and text "An overflow occurred while calculating the number of records affected, actual value is [RecordsAffected
]" will be posted. Refer to TdDataReader.RecordsAffected for an example.
If an overflow condition occurs when TdDataReader.RecordsReturned or TdDataReader.RecordsReturned64 is used, a warning message with code 114003 and text "An overflow occurred while calculating the number of records returned, actual value is [RecordsAffected
]" will be posted. Refer to TdDataReader.RecordsReturned for an example.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019