1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

simple relations between tables in an asp site

Discussion in 'C#' started by progfrog, Jul 23, 2008.

  1. #1
    hi guys

    i am trying to create relationships between two tables

    in an asp application.

    one of them is used as the primary key table and the other

    is used as the FK table.

    the problem is that the relations go well until i'm trying to

    save the tables and it tells me that

    The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Shop_Category".
    what is that mean?


    what is the ALTER TABLE STATEMENT?

    how can it be fixed?
    SEMrush
    thanx
    me
     
    progfrog, Jul 23, 2008 IP
    SEMrush
  2. Sleeping Troll

    Sleeping Troll Peon

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The Alter Table Statement is SQL that changes the structure of a table, this could include creating relationships. Without seeing your code I believe it is probably a duplicate key problem.
     
    Sleeping Troll, Jul 23, 2008 IP
  3. mohi.khan

    mohi.khan Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can u post ur code?? The alter table is for changing a table structure and does n't hv any relationship with wht u r doing here i.e joining...
    where r u working SQL Server or something else??
     
    mohi.khan, Jul 24, 2008 IP
  4. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #4
    dont forget to put your table structure just in case if needed :)
     
    ludwig, Jul 25, 2008 IP