Code: Select all
delete from Documents where ID=:xID
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);
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.