S
Shannon Broskie
Hello,
Let me first say that I'm pretty new to ADO.NET.
I have an application where extra data needs to be added to additional
columns in a dataset that do not come from a database.
Example:
I pull back security(stock / bond) info and populate that in a dataset. For
every record that comes back, I need to add an additional column named
accrued interest. The complexity of this calculation does not allow for it
to be calculated in SQL at the server.
Is there a way to:
1) Add the additional columns to the dataset before the dataset is filled?
2) Perhaps an event off the fill method that would allow additional
processing on each record as it comes in?
If not, is the best way to:
1) Create an in-memory dataset and set up the columns (perhaps
strongly-typed).
2) Use a SQLDataReader to pull back the data and write code to transfer each
column over the to in-memory dataset along with the extended processing for
additional columns.
In the current incarnation of the application (written in Delphi), I have to
create an in-memory ADO recordset and set up all of the columns. I then
pull back the data with another recordset and transfer all data to the
recordset with the extra columns.
Thanks for your help.
Let me first say that I'm pretty new to ADO.NET.
I have an application where extra data needs to be added to additional
columns in a dataset that do not come from a database.
Example:
I pull back security(stock / bond) info and populate that in a dataset. For
every record that comes back, I need to add an additional column named
accrued interest. The complexity of this calculation does not allow for it
to be calculated in SQL at the server.
Is there a way to:
1) Add the additional columns to the dataset before the dataset is filled?
2) Perhaps an event off the fill method that would allow additional
processing on each record as it comes in?
If not, is the best way to:
1) Create an in-memory dataset and set up the columns (perhaps
strongly-typed).
2) Use a SQLDataReader to pull back the data and write code to transfer each
column over the to in-memory dataset along with the extended processing for
additional columns.
In the current incarnation of the application (written in Delphi), I have to
create an in-memory ADO recordset and set up all of the columns. I then
pull back the data with another recordset and transfer all data to the
recordset with the extra columns.
Thanks for your help.