Deleting connecting row in m:n relationship

Posts   
 
    
larkydoo
User
Posts: 45
Joined: 30-Jun-2008
# Posted on: 22-Apr-2010 23:03:31   

I have two tables, let's call them A and B. I also have table A_B that forms a many-to-many relationship between A and B, using the integer key values Aid and Bid. What I need to do is, knowing a given Aid and Bid, delete the row in table A_B that contains those values.

I've tried:

A_BEntity myA_B = new A_BEntity(Aid,Bid); myA_B.Delete();

and it doesn't work.

Any ideas?

Thanks.

Laurie

larkydoo
User
Posts: 45
Joined: 30-Jun-2008
# Posted on: 22-Apr-2010 23:26:39   

Never mind. Silly mistake. Code works fine. It's the programmer who's the issue.