Icon View Incident Report

Serious Serious
Reported By: Richard Harding
Reported On: 3/15/2008
For: Version 1.08 Build 1
# 2565 Insert Triggers Are Being Executed During Repair, Optimize, or Alter

I can access the table INCIDENT via applications and the EDB Manager. I can export it, import it, back it up and restore it.

If I try to ALTER the table, I receive an #300 Error - "Cannot lock table for shared access".

Repairing the table results in every row being deleted with the message "The row nn is corrupted and has been removed (ElevateDB Error #300 Cannot lock table Incident for shared access)".

CREATE TABLE "Incident"
(
"ID" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL,
"ProjectID" INTEGER NOT NULL,
"Description" VARCHAR(60) COLLATE "ANSI" NOT NULL,
. . . .
)

CREATE TRIGGER "InsertIncident" BEFORE INSERT ON "Incident"
BEGIN
  DECLARE TempCursor CURSOR FOR stmt;   
  DECLARE Result DECIMAL(20,2) DEFAULT 0;       

  PREPARE stmt FROM 'SELECT IFNULL(MAX(ID) THEN 0 ELSE MAX(ID)) AS MAXID FROM Incident
WHERE ProjectID = ?';
  OPEN TempCursor USING NEWROW.ProjectID;
  FETCH FIRST FROM TempCursor (MAXID) INTO Result;    
  SET NEWROW.ID = Result + 1;
  CLOSE TempCursor;
END



Resolution Resolution
Cannot Fix Problem


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image