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

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
ender
Posts: 14
Joined: Mon 06 Jun 2005 11:32

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

Post by ender » Fri 25 Jul 2008 19:50

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 29 Jul 2008 05:51

We have reproduced this problem. We will fix it in the next build of DbxSda. At the moment you should just ignore this exception.

ender
Posts: 14
Joined: Mon 06 Jun 2005 11:32

Post by ender » Fri 01 Aug 2008 08:56

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?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 15 Aug 2008 12:56

You are right, in the current build, if you commit a transaction, required records will be deleted in spite of the exception.

Post Reply