
February 13th, 2013, 02:10 AM
|
|
|
Quote: | Originally Posted by jwcane Opened the table in IB_SQL, and the desired update worked fine. Also noticed in Delphi that the identity of the client user seems to matter. A user can update her own data, but cannot update data of others. Some records are not subject to this error, and others are. Does this tell us anything about the source of the error? |
Quote: | Does this tell us anything about the source of the error? |
It says that you have a UNIQUE INDEX defined in IDX_USERNAME (probably on the USERNAME field) and you entered a duplicate username. Take care of case sensitivity. Firebird is case sensitive so you might want to change all usernames to the same case first (upper or lower). I'd do that in a trigger like this:
CREATE OR ALTER TRIGGER users_biu0 FOR users
ACTIVE BEFORE INSERT OR UPDATE POSITION 1
AS
BEGIN
NEW.username = LOWER(NEW.username);
...
END
be aware to change "users" to your table name...
I saw some other similar posts from you in the forum...i'd advise to read more documentation on Firebird SQL. You'll find a lot of info on the official firebird page firebirdsql.org
|