G
Gaurav
Hi,
i have just started working on VB.net and got stuck on the following:
1) i have created a view in Sql Server 2000 using 2 tables and both of
them doesnt have primary keys but i have used inner join on the 1
column in common and those tables , i am confused if i update the data
in datagrid will it update the data in the corresponding tables
underlying the view?
2)I have been trying to update the data in datagrid but database is
not being updated with the code i am using,is there any problem with
my code given below which is on the form closing event:
If dsRelatedAgency.HasChanges Then // dsRelatedAgency is dataset for
the grid
adapRelatedAgency.Update(dsRelatedAgency.GetChanges,
"relatedAgencyView")
//adapRelatedAgency is the adater used for fetching
// relatedAgencyView is the view i have created
End If
i want that any addition,modification or deletion changes to the data
in datagrid should be reflected in my tables.
can someone help if my code is wrong or any suggestions for the
changes in code.
Thanks
gaurav
i have just started working on VB.net and got stuck on the following:
1) i have created a view in Sql Server 2000 using 2 tables and both of
them doesnt have primary keys but i have used inner join on the 1
column in common and those tables , i am confused if i update the data
in datagrid will it update the data in the corresponding tables
underlying the view?
2)I have been trying to update the data in datagrid but database is
not being updated with the code i am using,is there any problem with
my code given below which is on the form closing event:
If dsRelatedAgency.HasChanges Then // dsRelatedAgency is dataset for
the grid
adapRelatedAgency.Update(dsRelatedAgency.GetChanges,
"relatedAgencyView")
//adapRelatedAgency is the adater used for fetching
// relatedAgencyView is the view i have created
End If
i want that any addition,modification or deletion changes to the data
in datagrid should be reflected in my tables.
can someone help if my code is wrong or any suggestions for the
changes in code.
Thanks
gaurav