Article ID: 170765 - Last Review: May 2, 2006 - Revision: 2.1 PRB: Unable to Insert Record into Table Using Form WizardThis article was previously published under Q170765 On This PageSYMPTOMS
When you try to use the Form Wizard on a SQL Server table without
including the primary key field or a field with its Identity column checked
(and without setting the Identity Seed and Identity Increment properties to
valid values), you receive the following error message after you click Insert:
Unable to insert the record into <table name>. Source: Microsoft OLE DB Provider for ODBC Drivers Error Number: -2147467259 Description: [Microsoft][ODBC SQL Server Driver][SQL Server]The column <key field name> in table.<owner><table name> may not be null. This may be caused by an attempt to update a non-primary table in a view. CAUSE
When you try to update a table with a new record, the primary key and
index field must have a valid non-null value. If the primary key or index
field does not have its Identity column, Identity Seed, and Identity
Increment fields set, the update generates an error. The Seed and Increment
fields must be set, after which the primary key is automatically updated
with an auto-increment value whenever the table is updated with a new
record.
RESOLUTION
From within either Visual InterDev or SQL Enterprise Manager, set the Seed
value and Increment value to a valid value.
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce BehaviorSQL 6.5 Server Table:
REFERENCES
For the latest Knowledge Base articles and other support information on
Visual InterDev and Active Server Pages, see the following page on the
Microsoft Technical Support site:
http://support.microsoft.com/search/default.aspx?qu=vinterdev
(http://support.microsoft.com/search/default.aspx?qu=vinterdev)
| Article Translations
|
Back to the top
