Updating oracle sequence self liquidating publish

For more information on the upcoming change, we invite you to read our blog post.

Much to the frustration of database administrators worldwide, prior to Oracle version 12c in mid-2014, Oracle simply had no inherent ability to inherently generate auto incrementing columns within a table schema.

That means the database might generate different values from the ones ADO. Before submitting the pending inserts to the database, the example displays the contents of the rows.

Then, the code creates a new Oracle Data Adapter object and sets its Insert Command and the Update Batch Size properties.

The example also supplies the logic to return the server-generated values by using output parameters.

The difference between auto-increment columns in SQL Server and sequences in Oracle is that: When you create a sequence in an Oracle database, you can define its initial value and the increment between its values.

You can also query the sequence for new values before submitting new rows.

While the reasons for this design decision can only be guessed at, the good news is that even for users on older Oracle systems, there is a possible workaround to circumnavigate this pitfall and create your own auto incremented primary key column.

You must have an account to comment. Please register or login here!