Update failed. Found n records
Posted: Tue 11 Feb 2014 10:49
Hello!
I’ve got a firebird table with the following properties:
The column NEW_UNIQUE and the unique index A_IDX was added after inserting records in the table. Therefore the content of this column is null in each record.
Now I want to edit the column text like this:
On the post the message "Update failed. Found 10 records" appears.
It seems that the IBCQuery uses the index A_IDX instead of the primary key to build the where condition.
If I rename the Index A_IDX to Z_IDX, everything works fine.
Im using the following versions:
- Devart IBDAC 3.10.0.16 for Delphi 2007 for Win32
- Firebird 2.5.2
If desired, I will give you a Testprojet and a database.
Thank you for your help.
I’ve got a firebird table with the following properties:
Code: Select all
CREATE TABLE TESTTABLE (
IDENT INTEGER NOT NULL,
TEXT CHAR(50),
NEW_UNIQUE INTEGER
);
ALTER TABLE TESTTABLE ADD CONSTRAINT PK_TESTTABLE PRIMARY KEY (IDENT);
CREATE UNIQUE INDEX A_IDX ON TESTTABLE (NEW_UNIQUE);Now I want to edit the column text like this:
Code: Select all
IBCQuery1.Edit;
IBCQuery1.FieldByName('TEXT').AsString := s;
IBCQuery1.Post; It seems that the IBCQuery uses the index A_IDX instead of the primary key to build the where condition.
If I rename the Index A_IDX to Z_IDX, everything works fine.
Im using the following versions:
- Devart IBDAC 3.10.0.16 for Delphi 2007 for Win32
- Firebird 2.5.2
If desired, I will give you a Testprojet and a database.
Thank you for your help.