Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Corrupt Table Error
Wed, Feb 27 2008 12:24 AMPermanent Link

Richard Harding
Tim,

I have a table that I can access through 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)".

I have emailed the database files and csv file to support.

(My D5 applications are now back in the game - thank you).

--
Richard Harding
Windella Computer Knowhow
28 Freeman Drive
Lochinvar NSW 2321
Phone:   61 2 4930 7336
Mobile:   0419 016 032
email:   rharding@wck.com.au
Wed, Feb 27 2008 6:33 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< I have emailed the database files and csv file to support. >>

I'm waiting on the files, and will post more information when I get it.

<< (My D5 applications are now back in the game - thank you). >>

No problem, sorry it took a week to get this resolved.  I wanted to at least
give a try a fixing the issue with the .dcus before I resorted to the .pas
solution.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Feb 28 2008 7:36 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< 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)". >>

I repaired both the Project and Incident tables in the EDB Manager, and they
both repaired just fine with no errors.  Are you trying to repair the table
in the EDB Manager, or your application ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Mar 2 2008 4:27 PMPermanent Link

Richard Harding
Tim,


>>I repaired both the Project and Incident tables in the EDB Manager, and they
both repaired just fine with no errors.  Are you trying to repair the table
in the EDB Manager, or your application ?


I am repairing them in EDB Manager.

--
Richard Harding
Windella Computer Knowhow
28 Freeman Drive
Lochinvar NSW 2321
Phone:    61 2 4930 7336
Mobile:    0419 016 032
email:    rharding@wck.com.au
Mon, Mar 3 2008 7:04 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< I am repairing them in EDB Manager. >>

I'm stumped.  They seem to work just fine here.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Mar 11 2008 10:57 PMPermanent Link

Richard Harding
Tim,

I have some more information about this problem.

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)".

I will post the database in the binaries newsgroup.

The table has a trigger attached to it.  If I remove the trigger, I can then repair the table.

The trigger assigns the next sequential number within the project.  It works OK in the
application and when adding rows in EDB Manager.  It is only when it is being repaired OR
the table is being ALTERED that a problem appears.

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




--
Richard Harding
Windella Computer Knowhow
28 Freeman Drive
Lochinvar NSW 2321
Phone:   61 2 4930 7336
Mobile:   0419 016 032
email:   rharding@wck.com.au
Fri, Mar 14 2008 3:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< I have some more information about this problem.

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)".

I will post the database in the binaries newsgroup.

The table has a trigger attached to it.  If I remove the trigger, I can
then repair the table.

The trigger assigns the next sequential number within the project.  It
works OK in the application and when adding rows in EDB Manager.  It is only
when it is being repaired OR the table is being ALTERED that a problem
appears. >>

Okay, I figured that this might be an issue at some point.  Currently the
triggers are being fired in these contexts, when they probably shouldn't be.
I'll include this change in the next release.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image