• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3196
  • Last Modified:

C# code to create CSV file with SQL resultant output

Hello Experts,

I want to know how to create CSV file from table data present in dataset/datatable via C# code.

Any URL's or sample demo code which help me in understanding will be helpfull.

Thank You !!
0
Md Shah
Asked:
Md Shah
2 Solutions
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
Utkarsh KulkarniSr. Sw EngCommented:
Another way to do is bind this data to Grid & save that grid to CSV file. Sample code ref is

http://stackoverflow.com/questions/7090628/datagrid-to-csv-file

Simple workout is like

http://stackoverflow.com/questions/4959722/c-sharp-datatable-to-csv

This will give you clear idea.
0
 
Md ShahAuthor Commented:
Thanks guys for sharing the info... It works...

Cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now