Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Identity – PB Docs 2017 – PowerBuilder Library

Identity – PB Docs 2017

Identity

database parameter

Description

Specifies the syntax the SNC database interface uses to obtain the
identity value of a new row in a database table.

When a DataWindow update request inserts a new row into a
Microsoft SQL Server table that contains an IDENTITY column, the
DataWindow engine calls the SNC interface to obtain the identity value
of the newly inserted row. The Identity database parameter allows you to
define how this request is implemented.

Applies to

SNC SQL Native Client for Microsoft SQL Server

Syntax

Parameter

Description

value

A value specifying the syntax for obtaining the
identity value of a newly inserted row. Values
are:

  • @@IDENTITY

    (Default) Use the syntax SELECT @@identity.

  • IDENT_CURRENT()

    Use the syntax SELECT
    IDENT_CURRENT(‘tablename’). 

  • SCOPE_IDENTITY()

    Use the syntax SELECT scope_identity().

Default value

Identity=’@@IDENTITY’

Usage

By default, the SNC interface issues SELECT @@identity to obtain
the IDENTITY column value of the newly inserted row. It returns the last
IDENTITY value produced on a connection, regardless of the table that
produced the value, and regardless of the scope of the statement that
produced the value.

SELECT IDENT_CURRENT(‘tablename’)  returns the last IDENTITY value
produced in a table, regardless of the connection that created the
value, and regardless of the scope of the statement that produced the
value.

SELECT SCOPE_IDENTITY()  returns the last IDENTITY value produced
on a table and by a statement in the same scope, regardless of the table
that produced the value.

Because Identity is a dynamic database parameter, it can be set
and reset at any time during an application.

Examples

To specify the syntax for obtaining the identity value of a newly
inserted row:

  • Database profile

    Select SCOPE_IDENTITY() from the DataWindow Identity Value
    drop-down list on the Syntax page in the Database Profile Setup
    dialog box.

  • Application

    Type the following in code:


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