J
Jonas
Hi!
I want to extract a single row from one table in a typed dataset (dsUser)
containing multiple tables, and then send it on to a data access layer
component for create/read/update/delete operations. I found two ways:
1. Create a standalone typed dataset (dsPerson) with the same structure as
the one table I'm interested in, and use the Merge function to get the
content of the datatable.
dsPerson.Merge(dsUser.COR_Persons)
2. Extract the row by using the ItemArray property of the
dsPerson.COR_Persons and dsUser.COR_Persons datatables respectively.
Dim dsPerson As New COR_Persons
Dim personRow As COR_Persons.COR_PersonsRow
personRow = dsPerson.COR_Persons.NewCOR_PersonsRow
personRow.ItemArray = dsUser.COR_Persons(0).ItemArray
The first approach is the easiest implement, but I get a bulkier object to
send on the data access layer.
Does someone now anything about the performance differences for these two
approaches?
TIA
Jonas
I want to extract a single row from one table in a typed dataset (dsUser)
containing multiple tables, and then send it on to a data access layer
component for create/read/update/delete operations. I found two ways:
1. Create a standalone typed dataset (dsPerson) with the same structure as
the one table I'm interested in, and use the Merge function to get the
content of the datatable.
dsPerson.Merge(dsUser.COR_Persons)
2. Extract the row by using the ItemArray property of the
dsPerson.COR_Persons and dsUser.COR_Persons datatables respectively.
Dim dsPerson As New COR_Persons
Dim personRow As COR_Persons.COR_PersonsRow
personRow = dsPerson.COR_Persons.NewCOR_PersonsRow
personRow.ItemArray = dsUser.COR_Persons(0).ItemArray
The first approach is the easiest implement, but I get a bulkier object to
send on the data access layer.
Does someone now anything about the performance differences for these two
approaches?
TIA
Jonas