Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

how to delete data from table and related record

Last post 03-26-2008 5:45 AM by _::suhanna::_. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-26-2008 2:53 AM

    how to delete data from table and related record

     hi...

    im working with vb.net

     can u guys help me..

    i want to delete a record from table A, but this table got relation with table B.

     i only can delete if table A not related with table B

    this is my code:

    ExecuteSqlCommand("delete from area where tareaname='" & areaname & "'")
            CloseSqlRead()


    and if i run this error msg will out "The record cannot delete or change because "table A" includes related record"

    how do i do?

    please help me out

     

    thanks 

    • Post Points: 10
  • 03-26-2008 5:29 AM In reply to

    Re: how to delete data from table and related record

    You must to delete first the child record....in the Table B.

    Regards 

    • Post Points: 10
  • 03-26-2008 5:45 AM In reply to

    Re: how to delete data from table and related record

    i have done it now...

    thank you. 

    • Post Points: 5
Page 1 of 1 (3 items)