Solved

C# code to create CSV file with SQL resultant output

Posted on 2014-04-21
3
2,576 Views
Last Modified: 2014-04-22
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
Comment
Question by:Md Shah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
ID: 40013174
0
 
LVL 7

Accepted Solution

by:
Utkarsh Kulkarni earned 250 total points
ID: 40014123
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
 
LVL 8

Author Closing Comment

by:Md Shah
ID: 40016458
Thanks guys for sharing the info... It works...

Cheers
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Save json data from URL using SSIS 1 29
Visual Studio npm 1 29
how to check mis-spellings in a select SQL 2 38
Import a excel sheet in a grid 2 13
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question