Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SET AUTOINCERROR Command

Visual Studio 2005

Specifies whether attempts to update or insert values in a field with automatically incrementing values generate errors.

NoteNote

A cursor inherits the current setting of SET AUTOINCERROR when opened. Changing the value of SET AUTOINCERROR during a session does not change the setting for any cursors already opened. To change the setting of an open cursor, use the CURSORSETPROP( ) function.


SET AUTOINCERROR ON | OFF

Parameters

ON

Generates an error when updating or inserting a value in a field that uses automatically incrementing field values. The ON setting is the default for a global or private data sessions.

OFF

Does not generate an error when updating or inserting a value in a field that uses automatically incrementing field values and disregards the value specified for the field, which uses the appropriate incremented value.

The OFF setting provides greater utility when using tables that contain autoincrementing fields with certain language operations such as the APPEND FROM and INSERT INTO commands where you need to otherwise specify a fields list and omit those fields that use autoincrementing from the operation.

SET AUTOINCERROR is scoped to the data session.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.