Page 1 of 1

MSSCE 3.5. OLE DB error occured. Code 40EDCh.

Posted: Fri 25 Jul 2008 19:50
by ender
I've tried to delete a record from the table. The query is used:

Code: Select all

delete from Documents where ID=:xID
When there are linked records in another table I receive abovementioned error. When there are no linked records in another table there is no error.

The tables are defined as follows:

Code: Select all

create table Documents(
  ID integer identity (0, 1) constraint PK_Documents primary key,
  Batch_ID integer constraint FK_Doc_Batch_ID references Batches(ID) on delete cascade on update cascade,
  Name nvarchar(127) not null,
  TargetFormat integer,
  DocumentNameFixed bit,
  GroupID integer,
  constraint UC_Doc_Name unique (Batch_ID, Name));

create table Pages(
  ID integer identity (0, 1) constraint PK_Pages primary key,
  Document_ID integer,
  PageOrder integer not null,
  Format integer not null,
  Width integer not null,
  Height integer not null,
  ColorDepth integer not null,
  ResolutionX integer,
  ResolutionY integer,
  ResolutionUnits integer,
  DataSize integer,
  Data image,
  constraint UC_Pag_PageOrder unique (Document_ID, PageOrder),
  constraint FK_Pag_Document_ID foreign key (Document_ID) references Documents(ID) on delete cascade on update cascade);
As you see all linked records in the table "Pages" should be deleted when I delete parent record in the table "Documents". However it doesn't happen.

I've tried to delete records from MS Visual Studio 2008 Express via same SQL query. No problems. I'm evaluating possiblity to buy dbExpress driver for work with Microsoft SQL Server Compact Edition 3.5.

Posted: Tue 29 Jul 2008 05:51
by Antaeus
We have reproduced this problem. We will fix it in the next build of DbxSda. At the moment you should just ignore this exception.

Posted: Fri 01 Aug 2008 08:56
by ender
Antaeus wrote:We have reproduced this problem. We will fix it in the next build of DbxSda. At the moment you should just ignore this exception.
So you say I can commit transaction after this exception and required records (the one which specified in DELETE statement and linked) will be deleted?

Posted: Fri 15 Aug 2008 12:56
by Dimon
You are right, in the current build, if you commit a transaction, required records will be deleted in spite of the exception.