Is 'on delete cascade' exist for Access ?

  • Thread starter Thread starter Nostrabs
  • Start date Start date
N

Nostrabs

Guest
Hi,

I want to create a small program which add table into an Access 2000 base with relations. I use ADO for that, but it seems that it is not possible to create a relation with 'ON DELETE CASCADE' and 'ON UPDATE CASCADE' parameters. Can you tell me if it exists another meaning to create relation with cascade delete & utpdate ?

Thanks for answer. I have the same problem with DEFAULT keyword which is not recognize into a query.

My query :
CREATE TABLE dtaConsignes (Ident COUNTER CONSTRAINT MyFieldConstraint PRIMARY KEY, AlmGrpIdent INTEGER CONSTRAINT MyFieldConstraint2 REFERENCES dtaAlarmsGroups(Ident) ON DELETE CASCADE ON UPDATE CASCADE, Consigne VARCHAR(200) NOT NULL);

You are my last chance !!!!!!!!!

:rolleyes:
 
Cascade delete does exist. I have not tried to use ADO to create tables. You should be aware though that DAO was designed specifically to work with Jet and that there are options that DAO supports that ADO does not. So if you can't do it with ADO, switch to DAO and you will be able to do it.
 
'ON DELETE CASCADE' by SQL command

Pat Hartman said:
Cascade delete does exist. I have not tried to use ADO to create tables. You should be aware though that DAO was designed specifically to work with Jet and that there are options that DAO supports that ADO does not. So if you can't do it with ADO, switch to DAO and you will be able to do it.

Thanks for your answer.

I try this morning with DAO but it is the same problem. I suppose that Microsoft Access doesnot integrate all SQL command (like CASCADE or DEFAULT).
It seems that is a lost cause !!!!!
 
Indeed , (ANSI) SQL is not quite similar to Access SQL.
You can use DAO methods in Access to create, for instance, relationships..
Look up "CreateRelation" in Access Help, the topic includes an example also.

RV
 
Greetings

RV said:
Indeed , (ANSI) SQL is not quite similar to Access SQL.
You can use DAO methods in Access to create, for instance, relationships..
Look up "CreateRelation" in Access Help, the topic includes an example also.

RV

Great thanks for your help.
"CreateRelation" is OK then I wrote my program with DAO.
You're great !!
 

Users who are viewing this thread

Back
Top Bottom