RecheckRows – PB Docs 126

RecheckRows database parameter

Description

Rechecks the number of rows affected by an INSERT, UPDATE,
or DELETE command and returns it in the SQLNRows property of the Transaction
object.

Controls

  • ADO.NET

  • OLE DB

  • SNC SQL Native Client for Microsoft SQL Server

Syntax

Parameter

Description

value

Specifies whether the value of the Microsoft SQL Server @@rowcount
property is checked and returned in the SQLNRows property
of the Transaction object. Values are:

  • 0

    (Default) Do not recheck the count of affected rows.

  • 1

    Recheck the count of affected rows.

Default

RecheckRows=0

Usage

In Microsoft SQL server,
if a table has an insert, update, or delete trigger, the number
of affected rows returned to the SQLNRows property
of the Transaction object after an INSERT, UPDATE,
or DELETE command depends on the driver. With
an ADO.NET driver, the value returned is the sum of the rows affected
by the command itself and the trigger.

When you are connected to Microsoft SQL Server
using ADO.NET or OLE DB, you can set the RecheckRows runtime database
parameter to 1 to recheck how many rows of data were affected by
the INSERT, UPDATE, or DELETE command
itself and return that value in the SQLNRows property.

Setting RecheckRows to 1 before issuing an INSERT, UPDATE,
or DELETE command causes a SELECT @@ROWCOUNT command
to be executed. To improve performance, you should set it only when
required, and reset it to the default value of 0 after use.

Examples

To set RecheckRows to 1, type the following in code:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x