PRB: ODBC Error When Updating an Edited Record (166882)



The information in this article applies to:

  • Microsoft Visual Database Tools
  • Microsoft Data Access Components 2.5

This article was previously published under Q166882

SYMPTOMS

The following error occurs in the Query Designer when you move off an edited table record:
ODBC Error: Client Cursor: 12 - No key columns are specified for the update table.

CAUSE

In the Query designer, a table must have a key column specified so that you can edit the table data. The Query Designer uses SQL "Update ... Where" syntax to update the record and requires a key field in the Where clause to uniquely identify the record.

RESOLUTION

Specify a key column in your table. See the InfoView topic titled [ASCII 147]Defining a Primary Key[ASCII 148] under [ASCII 147]Microsoft Visual Database Tools, Database Designer, Working with Database Objects, Constraints[ASCII 148]

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new table.
  2. Save the table.
  3. Open the table.
  4. Add a new record to the table.
  5. Move off the record you just added.
  6. Go back and edit a field in the new record.
  7. Move off the record. The error message described above appears.

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:

Modification Type:MajorLast Reviewed:5/2/2006
Keywords:kbDatabase kbprb KB166882