Advertisement

04.10.2008 at 08:10AM PDT, ID: 23312026
[x]
Attachment Details

Generic way to export SQL results to different CSV templates

Asked by knuckle05 in Microsoft Visual Basic.Net, .NET, .NET Framework 2.0

Tags: VB.NET 2005, File Export

Hi All,

I have a large SQL result set that I often need to dump to a CSV file. The request to dump this data to a CSV file is always different. Different clients want to see different columns of data, in different order, and some want to have column header and footers and some don't.

I was thinking of doing something with Config files so that I could just build a new config file with the CSV column specs and then pass that config file name as a parameter and then my CSV would be output.

Right now, I'm constantly adding new conditions to my program to accommodate every new request and this is obviously far from efficient.

Can anyone help me out with some suggestions and perhaps some samples to get me started? I want to build this the most efficient way possible so that virtually no code changes will be necessary.

ThxStart Free Trial
 
 
[+][-]04.10.2008 at 06:54PM PDT, ID: 21330926

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET, .NET Framework 2.0
Tags: VB.NET 2005, File Export
Sign Up Now!
Solution Provided By: PlatoConsultant
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628