Subject partner index description not found (175)
Author Mr.Phuoc.H.Nguyen
I have a database
<http://www.experts-exchange.com/Databases/Interbase/Q_21472905.html#>
called abc.gdb which has ACCOUNT_LIST table:
* Table: ACCOUNT_LIST */

SET SQL
<http://www.experts-exchange.com/Databases/Interbase/Q_21472905.html#>
DIALECT 3;

SET NAMES UNICODE_FSS;



/* Tables definitions */

CREATE TABLE ACCOUNT_LIST (
ACCOUNT_ID UVAR15 NOT NULL,
PACCOUNT_ID UVAR15,
ACCOUNT_NAME UVAR127,
ENGLISH_NAME UVAR127,
OTYPE_ID DMSMALLINT,
DTYPE_ID DMSMALLINT,
FOLLOW_BAL DMSMALLINT,
ACCOUNT_TAG DMSMALLINT,
BALANCE_TYPE DMSMALLINT,
ISMIN DMSMALLINT,
ISSELECT DMSMALLINT,
ACC_LEVEL DMSMALLINT,
FOLLOW_DOCBAL DMSMALLINT,
HAS_BALANCE DMSMALLINT,
NOTICE_WHENEXP DMSMALLINT);

/* Primary keys definition */

ALTER TABLE ACCOUNT_LIST ADD CONSTRAINT PK_ACCOUNT_LIST PRIMARY KEY
(ACCOUNT_ID);


/* Foreign keys definition */

ALTER TABLE ACCOUNT_LIST ADD CONSTRAINT FK033 FOREIGN KEY (PACCOUNT_ID)
REFERENCES ACCOUNT_LIST (ACCOUNT_ID) ON UPDATE CASCADE;
ALTER TABLE ACCOUNT_LIST ADD CONSTRAINT FK_ACCOUNT_LIST_DTYPE FOREIGN
KEY (DTYPE_ID) REFERENCES OBJECT_TYPE (OTYPE_ID) ON UPDATE CASCADE;
ALTER TABLE ACCOUNT_LIST ADD CONSTRAINT FK_ACCOUNT_LIST_OTYPE FOREIGN
KEY (OTYPE_ID) REFERENCES OBJECT_TYPE (OTYPE_ID) ON DELETE SET NULL ON
UPDATE CASCADE;


/* Indices definition */
CREATE INDEX ON ();
/* Triggers definition */

SET TERM ^ ;

/* Trigger: ACCOUNT_LIST_AD0 */
CREATE TRIGGER ACCOUNT_LIST_AD0 FOR ACCOUNT_LIST
ACTIVE AFTER DELETE POSITION 0
AS
declare variable cocon smallint;
begin
if (old.paccount_id is not null) then
begin
select count(*) from account_list
where paccount_id=old.paccount_id and account_id<>old.account_id
into :cocon;
if (cocon=0) then
update account_list set ismin=1 where account_id=old.paccount_id;
end
end
^

/* Trigger: ACCOUNT_LIST_AI0 */
CREATE TRIGGER ACCOUNT_LIST_AI0 FOR ACCOUNT_LIST
ACTIVE AFTER INSERT POSITION 0
AS
begin
if (new.paccount_id is not null) then
update account_list set ismin=0 where account_id=new.paccount_id;
end
^

/* Trigger: ACCOUNT_LIST_BI0 */
CREATE TRIGGER ACCOUNT_LIST_BI0 FOR ACCOUNT_LIST
ACTIVE BEFORE INSERT POSITION 0
AS
begin
if (new.balance_type is null) then new.balance_type=0;
if (new.follow_bal is null) then new.follow_bal=0;
if (new.follow_docbal is null) then new.follow_docbal=0;
new.ismin=1;
end
^


SET TERM ; ^


/* Fields descriptions */

DESCRIBE FIELD ACCOUNT_TAG TABLE ACCOUNT_LIST
'So the tai khoan
0: Tk binh thuong
1: tai khoan VAT
2: tai khoan doanh thu';

DESCRIBE FIELD BALANCE_TYPE TABLE ACCOUNT_LIST
'Kieu so du
0: du no
1: Du co
2: Luong tinh
3: So du 2 ben ';

DESCRIBE FIELD FOLLOW_BAL TABLE ACCOUNT_LIST
'Có theo doi so du theo yeu to hay khong ?';

DESCRIBE FIELD ISMIN TABLE ACCOUNT_LIST
'de dung lam gi, neu tim duoc thi khi vao day !
Vi that su khongtcan truong nay lam !';

DESCRIBE FIELD OTYPE_ID TABLE ACCOUNT_LIST
'Loai doi tuong theo doi chi tiet cua tai khoan ';

When I insert a new row into ACCOUNT_LIST, it is OK.
When I delete or change a row in ACCOUNT_LIST, there is the following
error raised:
"Unsuccessful execution caused by a system error precludes
successful execution of subsequent statements, internal gds software
<http://www.experts-exchange.com/Databases/Interbase/Q_21472905.html#>
consistency check (partner index description not found (175))
Please help me to solve the problem.
Thanks,
Phuoc Nguyen