how to delete data from table and related record

  • 12 years ago


    im working with

     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 & "'")

    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



  • 12 years ago

    i have done it now...

    thank you. 

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Java is to JavaScript what Car is to Carpet.” - Chris Heilmann