This example demonstrates adding a record to the database and retrieving the value of an Identity field that is handled by the database. This example uses a Stored Procedure to return the Identity field's value that was automatically created by the database. Retrieving the Identity field for a newly inserted record relies on a live database connection (session). The DBConnect class opens and closes the database connection as needed, so a Stored Procedure is required.

Customer Name: