deleting multiple record same time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JK.Jarmen@gmail.com

    #1

    deleting multiple record same time

    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

  • Cor Ligthert [MVP]

    #2
    Re: deleting multiple record same time

    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.publi c.dotnet.framew ork.adonet is
    probably a much better place.

    I hope this helps,

    Cor

    <JK.Jarmen@gmai l.com> schreef in bericht
    news:1144093129 .787423.45790@g 10g2000cwb.goog legroups.com...[color=blue]
    > 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
    >[/color]


    Comment

    Working...