Home All Groups Group Topic Archive Search About

deleting multiple record same time

Author
3 Apr 2006 7:38 PM
JK.Jarmen@gmail.com
hi everbody...

i am using vb.net 2005 and sql server 2005.
my master-detail table

tableADISYON                      tableAYRINTI

ID                                         ID
ADISYONNO   <--------->        ADISYONNO
DATE                                   URUN
..........                                  .........
..........                                  .........
..........                                  .........
..........                                  .........

i am create relation ADISYONNO field. how i do delete master table row
and detail tabel same time.


ID      ADISYONNO     DATE        ...... ....... ......
1       1                       01.01.2006 12:00:00

   ID       ADISYONNO      URUN   ...... ....... ......
   1        1                        PIZZA
   2        1                        COLA
   3        1                        TEA
   4        1                        PIZZA


i am deleting master table ADISYONNO = 1 record , how i can delete same
time detail table ADISYONNO = 1 field


thanks

Author
4 Apr 2006 7:22 AM
Cor Ligthert [MVP]
Hi,

Have a look for on MSDN for Cascade.

You know that for this kind of questions which is not directly related to
language.vb code the newsgroup Microsoft.public.dotnet.framework.adonet is
probably a much better place.

I hope this helps,

Cor

<JK.Jar***@gmail.com> schreef in bericht
Show quoteHide quote
news:1144093129.787423.45790@g10g2000cwb.googlegroups.com...
> hi everbody...
>
> i am using vb.net 2005 and sql server 2005.
> my master-detail table
>
> tableADISYON                      tableAYRINTI
>
> ID                                         ID
> ADISYONNO   <--------->        ADISYONNO
> DATE                                   URUN
> .........                                  .........
> .........                                  .........
> .........                                  .........
> .........                                  .........
>
> i am create relation ADISYONNO field. how i do delete master table row
> and detail tabel same time.
>
>
> ID      ADISYONNO     DATE        ...... ....... ......
> 1       1                       01.01.2006 12:00:00
>
>   ID       ADISYONNO      URUN   ...... ....... ......
>   1        1                        PIZZA
>   2        1                        COLA
>   3        1                        TEA
>   4        1                        PIZZA
>
>
> i am deleting master table ADISYONNO = 1 record , how i can delete same
> time detail table ADISYONNO = 1 field
>
>
> thanks
>