Key Violations
When I try to add records using a dbgrid and dbexpress Clientdataset D7 and Corelab dbexpress driver into a table with Auto_increment field, I get a "key violation" error on the second record entry.
For test I used the table in MySQL documentaion examples
CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
When I insert data in the MySQL query Browser it works
INSERT INTO animals (name) VALUES
('dog'),('cat'),('penguin'),
('lax'),('whale'),('ostrich');
The same insert statement works with my form when I add it to a SQLQuery and do SQLQuery.execSQL() with a button;
This will work as many times as you click the botton.
But when I add data in the grid I get Key Violation on the second entry!
I have set the id field Providerflags Pfinwhere and PfinKey = True!
Can any one tell me whats wrong please?
Thanks,
Ed
Subject
Written By
Posted
Key Violations
April 26, 2006 01:38PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.