HELP: No Cascade Delete in MSDE! (SQL Server)

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I am trying to delete a record from a database using ADO.NET (with VB.NET),
but because there are relationships defined in my MSDE db it produces a
referential integrity error.

In Access it automatically cascade deletes! How can I do this with MSDE?
 
You have to define it on your relationships, the same way you did in
Access/Jet. There's nothing automatic about it in either product. See
SQL Books Online, CREATE TABLE topic, FOREIGN KEY constraint.

-- Mary
MCW Technologies
http://www.mcwtech.com
 
I am trying to delete a record from a database using ADO.NET (with VB.NET),
but because there are relationships defined in my MSDE db it produces a
referential integrity error.

In Access it automatically cascade deletes! How can I do this with MSDE?

Which version of MSDE are you using? SQL Server 7 / MSDE 7 didn't have
the cascading delete feature yet- you'll need to use MSDE 2000 for
this.

You'll need to define your relationship between two tables to actually
be passing on deletes in a cascading delete fashion - it won't happen
automagically

Read up on the details in the SQL Server Books Online - really helpful
source of information on SQL Server stuff!

Marc
 
Thanks alot everyone!

Marc Scheuner said:
Which version of MSDE are you using? SQL Server 7 / MSDE 7 didn't have
the cascading delete feature yet- you'll need to use MSDE 2000 for
this.

You'll need to define your relationship between two tables to actually
be passing on deletes in a cascading delete fashion - it won't happen
automagically

Read up on the details in the SQL Server Books Online - really helpful
source of information on SQL Server stuff!

Marc
 
Back
Top