N
Neil.Smith
I've encountered a strange problem when trying to update data in two
tables using a dataset. My application is split between a client
(presentation) and webservice (business and DAL).
I have a typed dataset, HSEDataset, containing two tables related by a
foreign key constraint. I use the standard GetChanges() method to get
a dataset containing only the changes to the tables, looking at these
tables I can see my changes on the client, i.e. 1 row in table 1 and 1
row in table 2, so far so good.
When I send the dataset to my webservice, however, I get 1 row in
table 1 and 0 rows in table 2?? The first table is subsequently
updated without a problem, the second obviously updates nothing. I've
since simplified things even further by just sending the second table,
however, using GetChanges on the dataset and sending the subsequent
table still doesn't work:
Dim pChanges As DataSet = Me.HSEDataset.GetChanges
Dim mychanges As HSECoreBLL.HSEDataset.IncidentsDataTable =
pChanges.Tables(1)
But calling GetChanges directly does:
Dim mychanges2 As HSECoreBLL.HSEDataset.IncidentsDataTable =
Me.HSEDataset.Tables(1).GetChanges
Both methods show 1 row in the resultant table after calling
GetChanges on the client, but only with the second method does the
webservice receive this row!! Something must be happening when the
data is being marshalled and sent to the webservice, but I can't find
the problem replicated anywhere else, any ideas?
tables using a dataset. My application is split between a client
(presentation) and webservice (business and DAL).
I have a typed dataset, HSEDataset, containing two tables related by a
foreign key constraint. I use the standard GetChanges() method to get
a dataset containing only the changes to the tables, looking at these
tables I can see my changes on the client, i.e. 1 row in table 1 and 1
row in table 2, so far so good.
When I send the dataset to my webservice, however, I get 1 row in
table 1 and 0 rows in table 2?? The first table is subsequently
updated without a problem, the second obviously updates nothing. I've
since simplified things even further by just sending the second table,
however, using GetChanges on the dataset and sending the subsequent
table still doesn't work:
Dim pChanges As DataSet = Me.HSEDataset.GetChanges
Dim mychanges As HSECoreBLL.HSEDataset.IncidentsDataTable =
pChanges.Tables(1)
But calling GetChanges directly does:
Dim mychanges2 As HSECoreBLL.HSEDataset.IncidentsDataTable =
Me.HSEDataset.Tables(1).GetChanges
Both methods show 1 row in the resultant table after calling
GetChanges on the client, but only with the second method does the
webservice receive this row!! Something must be happening when the
data is being marshalled and sent to the webservice, but I can't find
the problem replicated anywhere else, any ideas?