S
spebola
I am using VB.Net 2003 Professional, .net Framework 1.1 writing a
Windows Form application.
My application requires that I provide an option to copy a set of data
from a data table, change the effective data and at least one other
item, and add this modified data to the data table. For example, a
data table contains a list of owners in an oil well and their
percentage of ownership. At some point, an owner sells his/her
interest to another entity effective at the beginning of the month.
Ownership Table.
12/2002 Owner A 25%
12/2002 Owner B 25%
12/2002 Owner C 25%
12/2002 Owner D 25%
Effective 03/2003 Owner A sells his interest to Owner B resulting in
the following table:
03/2003 Owner B 50%
03/2003 Owner C 25%
03/2003 Owner D 25%
I fill a dataset using the existing Table's data and display this data
using a data-bound datagrid. The user makes the appropriate changes,
and row 1 has a Row State of Deleted, row 2 has a Row State of
Modified, and rows 3-4 have a Row State of unchanged. If I update the
data table using this dataset, I replace the existing data. I need to
keep the existing data, and add 3 new rows with a different effective
date. The Row State is a read only property. One soultion that comes
to mind is to create a second data set with the schema for the data
table, add the rows, and use this dataset to update the data table. Is
there an easier method to accomplish this? I am using the data
adapter's command builder to update the dataset.
Windows Form application.
My application requires that I provide an option to copy a set of data
from a data table, change the effective data and at least one other
item, and add this modified data to the data table. For example, a
data table contains a list of owners in an oil well and their
percentage of ownership. At some point, an owner sells his/her
interest to another entity effective at the beginning of the month.
Ownership Table.
12/2002 Owner A 25%
12/2002 Owner B 25%
12/2002 Owner C 25%
12/2002 Owner D 25%
Effective 03/2003 Owner A sells his interest to Owner B resulting in
the following table:
03/2003 Owner B 50%
03/2003 Owner C 25%
03/2003 Owner D 25%
I fill a dataset using the existing Table's data and display this data
using a data-bound datagrid. The user makes the appropriate changes,
and row 1 has a Row State of Deleted, row 2 has a Row State of
Modified, and rows 3-4 have a Row State of unchanged. If I update the
data table using this dataset, I replace the existing data. I need to
keep the existing data, and add 3 new rows with a different effective
date. The Row State is a read only property. One soultion that comes
to mind is to create a second data set with the schema for the data
table, add the rows, and use this dataset to update the data table. Is
there an easier method to accomplish this? I am using the data
adapter's command builder to update the dataset.