Article ID: 170765
Article Last Modified on 5/2/2006
APPLIES TO
- Microsoft Visual InterDev 1.0 Standard Edition
This article was previously published under Q170765
SYMPTOMS
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:
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 INFORMATION
Steps to Reproduce Behavior
SQL 6.5 Server Table:
- In Data View, right-click Tables, and then click New Table. Name the table customers.
- Create the following three fields: custID(int, Not Null, primary key), fname(varchar(15), Not Null), lname(varchar(15), Not Null).
- Use the Data Form Wizard to create a form based on the customers table.
- Select all fields to be included in the form except the custID field.
- Preview the xxxform.asp. Click New, type data into the fields, and then click Insert.
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:
Additional query words: -2147467259
Keywords: kberrmsg kbdatabase kbprb KB170765