G
Guest
Hi guys
Ok, here's the situation. I'm building a reporting system for my
application, that basically creates a CSV file based on a load of data in my
database.
I'm trying to make the application as "extensible" as possible, by not
hardcoding anything. So I'm thinking you can select a report type, and that
runs a peice of code that runs a stored proceedure and puts the results into
a CSV.
I suppose the first question is "is there an easy to way to do that that I
haven't found yet?".
My idea is to simply go through the data reader and dump everytihng to CSV,
the problem is.. I can't do that cos I won't know how many fields there are.
Can I find that out from the DataReader, and can I grab the field names from
the DataReader so that I can put these at the top of my CSV?!
Any help/ideas appreciated!
Cheers
Dan
Ok, here's the situation. I'm building a reporting system for my
application, that basically creates a CSV file based on a load of data in my
database.
I'm trying to make the application as "extensible" as possible, by not
hardcoding anything. So I'm thinking you can select a report type, and that
runs a peice of code that runs a stored proceedure and puts the results into
a CSV.
I suppose the first question is "is there an easy to way to do that that I
haven't found yet?".
My idea is to simply go through the data reader and dump everytihng to CSV,
the problem is.. I can't do that cos I won't know how many fields there are.
Can I find that out from the DataReader, and can I grab the field names from
the DataReader so that I can put these at the top of my CSV?!
Any help/ideas appreciated!
Cheers
Dan