Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View Update Problem

Status
Not open for further replies.

phita

Programmer
Jun 8, 2001
82
0
0
KE
Hi All,

I am using a local view to access and update data in a table. However, when
I try to delete or update a record in the view I sometimes receive one of the following messages:

1. Update Conflict
2. No key columns is specified for the update table "Mydata!Myfile". Use the key field list property of the cursor.

What could have gone wrong with my View? Are there any special setting I need to cater for the view.

Thanks in advance,

Phita
 
Phita,
When you do updates are you changing any primary key or candidate key values in the underlying table?

If it not too complicated, could you post the code that's generated by GENDBC for this view?

Rick

 
The message indicates that no key field was specified in the view definition. If you want the view to be updatable, among other requirements, you must specify a key field. This is done in the UPDATE CRITERIA tab of the view designer. Click to the left of the field in the Field Name window (underneath the key icon) to specify which field is to be considered the key field. This key corresponds to the "key field" referred to in the SQL WHERE CLAUSE window, which indicates the conditions under which the view's underlying tables will be updated in order to protect records from conflicting updates (one user overwriting another user's changes).

Hope this helps. Mike Krausnick
 
Hi,

"When you do updates are you changing any primary key or candidate key values in the underlying table?"

I am not changing anything in the table directly. I am using the view to do the updates, e.g. add new record, delete record, e.t.c. The above error messages appear even when I try to delete a record.

I have checked that all the properties of the view are OK, i.e. the Key Field and also the updateable fields.

Thanks guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top