Microsoft KB Archive/166882

= PRB: ODBC Error When Updating an Edited Record =

Article ID: 166882

Article Last Modified on 5/2/2006

-

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.



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.

