Solved

C# code to create CSV file with SQL resultant output

Posted on 2014-04-21
3
2,628 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

728 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