U
Uri Dor
Hi everyone,
We're writing a windows forms application which produces various
reports. Some of the reports include complex financial calculations of
several types. Each calculation type is performed in a separate
'engine', which returns a DataTable.
For example, we'll have the following engines: (simplified for the sake
of discussion)
holdings: given a protfolio ID, gives a list of the stocks in it and
amounts.
stockinfo: given a set of stocks, fetches information about them (name,
stock exchange, etc.)
The process should be:
- receive a portfolio ID
- activate the holdings engine to get the holdings
- activate the stockinfo engine to get the info
The stockinfo engine needs to perform a SELECT which is filtered by the
output of the holdings engine, otherwise the query result will be way
too big.
The obvious thing would be to perform some kind of SQL JOIN between the
holdings engine's output and the database table stockinfo uses, but how
can I join a DataTable in memory with a database table?
I'd appreciate it if anyone has insight on this or ideas on how to
perform this.
Thx
Uri
We're writing a windows forms application which produces various
reports. Some of the reports include complex financial calculations of
several types. Each calculation type is performed in a separate
'engine', which returns a DataTable.
For example, we'll have the following engines: (simplified for the sake
of discussion)
holdings: given a protfolio ID, gives a list of the stocks in it and
amounts.
stockinfo: given a set of stocks, fetches information about them (name,
stock exchange, etc.)
The process should be:
- receive a portfolio ID
- activate the holdings engine to get the holdings
- activate the stockinfo engine to get the info
The stockinfo engine needs to perform a SELECT which is filtered by the
output of the holdings engine, otherwise the query result will be way
too big.
The obvious thing would be to perform some kind of SQL JOIN between the
holdings engine's output and the database table stockinfo uses, but how
can I join a DataTable in memory with a database table?
I'd appreciate it if anyone has insight on this or ideas on how to
perform this.
Thx
Uri