table structure - wrong columns being called

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • L&G via DotNetMonster.com

    #1

    table structure - wrong columns being called

    hi.

    ive 3 tables in my access database file. table people [column name "cust"] to
    table sales [column name "cus2] is a one to many relationship, and the same
    goes for Table sales [column name "salesinv"] and Table receipt [column name
    "sinv2"].

    i find that in my initial dataset (ds) everythings fine - the rows are
    properly linked and displayed in my datagrid. however when i clear the
    dataset and the data relations and then try to load only particular rows in
    my second form, the program seems to be creating a nonexistent column "cus2"
    for my table receipt, and it insists that it wont update my new row for table
    receipt properly because:

    System.InvalidO perationExcepti on : Missing the DataColumn "cus2" in the Data
    Table 'receipt' for the Source Column "cus2"
    at System.Data.Com mon.DbDataAdapt er.Update(DataR ow[] DataRows,
    DataTableMappin g tableMapping)
    at System.Data.Com mon.DbDataAdapt er.Update(DataS et [] dataset, String
    srcTable)

    cus2 was never part of receipt. its a column in sales. however in the same
    event handler im able to properly add a record for the sales table.

    what do i do please? why is this happening?

    --
    Message posted via DotNetMonster.c om
    Best online pokies for real money in Australia and learn about safety and game mechanics in this comprehensive guide.


  • Cor Ligthert [MVP]

    #2
    Re: table structure - wrong columns being called

    Hi,
    >dataset and the data relations and then try to load only particular rows in
    >my second form, the program seems to be creating a nonexistent column
    >"cus2"
    is the "my second form" a typo, or an existing form. If it is the second
    table, than I cannot understand it either, but better than now.

    Cor


    "L&G via DotNetMonster.c om" <u16975@uweschr eef in bericht
    news:65234fa3ce 22d@uwe...
    hi.
    >
    ive 3 tables in my access database file. table people [column name "cust"]
    to
    table sales [column name "cus2] is a one to many relationship, and the
    same
    goes for Table sales [column name "salesinv"] and Table receipt [column
    name
    "sinv2"].
    >
    i find that in my initial dataset (ds) everythings fine - the rows are
    properly linked and displayed in my datagrid. however when i clear the
    dataset and the data relations and then try to load only particular rows
    in
    my second form, the program seems to be creating a nonexistent column
    "cus2"
    for my table receipt, and it insists that it wont update my new row for
    table
    receipt properly because:
    >
    System.InvalidO perationExcepti on : Missing the DataColumn "cus2" in the
    Data
    Table 'receipt' for the Source Column "cus2"
    at System.Data.Com mon.DbDataAdapt er.Update(DataR ow[] DataRows,
    DataTableMappin g tableMapping)
    at System.Data.Com mon.DbDataAdapt er.Update(DataS et [] dataset, String
    srcTable)
    >
    cus2 was never part of receipt. its a column in sales. however in the same
    event handler im able to properly add a record for the sales table.
    >
    what do i do please? why is this happening?
    >
    --
    Message posted via DotNetMonster.c om
    Best online pokies for real money in Australia and learn about safety and game mechanics in this comprehensive guide.

    >

    Comment

    Working...