naming a typed dataset table during fill

  • Thread starter Thread starter Roy Forkner
  • Start date Start date
R

Roy Forkner

I have a typed dataset with three tables. The names are "SaleCustTable",
"SaleInvTable", and "CompanyDetail".
when the dataset is filled ie: da.fill(ds) should the table be named with
the above names or, should you use . and then the table name or just name
them something else?
When I used the da.fill(ds.SaleInvTable), I had an error "Failed to enable
constraints. One or more rows contain values violating non-null, unique, or
a foriegn key constraints"
Trying da.fill(ds,"SaleInvTable") returned the same error.
Trying da.fill(ds,"inv") returned no error and it did have data.
I would assume, because off the errors, the first two methods are not the
way to go???
If someone would clear this up, I would appreciate it.
Thanks,
Roy
 
Check that you are filling your tables in the right order, otherwise you
will break constraints (ie you can't have orders without customers etc..).
Also if you want to allow some of these rules to break make sure you have
specified nullable and minoccurs in your typed dataset definition.

hth
 
Back
Top