form not editing table

Creating and using forms
Post Reply
prickles
Posts: 25
Joined: Sat Jun 07, 2008 4:19 am

form not editing table

Post by prickles »

i want the form to edit the table . to add new numbers . and edit life and date details.
on the form when i put in the same number with differing details comes back with

Violation of unique constraints SYS_PK-47; duplicate value(s)for column(s) "cow Number"
in statement [ UPDATE "Cows"SET "CowNumber"=? WHERE "CowNumber"=?]


I want the form to edit (change the life id or breed details of CowNumber .
I think i have the fiorm controls set correctly to do this
Any help appreciated

windows xp... oo 2.4
Attachments
New Database Herd.odb
(11.67 KiB) Downloaded 175 times
User avatar
squenson
Volunteer
Posts: 1885
Joined: Wed Jan 30, 2008 9:21 pm
Location: Lausanne, Switzerland

Re: form not editing table

Post by squenson »

If you input an existing Cow number on a new record, then you will have the same value of the key for two records which is not allowed, and therefore you get an error message. You first have to find the right cow with the navigation button at the bottom, or click on the binoculars and type the cow number in the search field, this will find the correct record that you can then edit.
LibreOffice 4.2.3.3. on Ubuntu 14.04
Post Reply