-1

Hi Experts i have question . My users will have a asp.net web page . User will simply execute a store procedure using button click . Store procedure will produce some results i want to export those results into CSV format Regards

Dev
  • 307
  • 1
  • 2
  • 12
  • What's the question? You might consider discussing the web page server side technology, where you want the results delivered (file on the server, to the client as a download, something else...) and anything else pertinent. – Andiih Jul 15 '14 at 13:46
  • Well question is "I Export SQL Query results into CSV format " My database is SQL server 2005 . – Dev Jul 15 '14 at 13:56
  • So you want people to be able go onto a website, run a query and export the results as a CSV? If so, you may want to have a look at http://stackoverflow.com/questions/4249432/export-to-csv-via-php as you will want to do it via the web page side of things rather than the database side of things – franglais Jul 15 '14 at 14:05
  • Well thanks I already know database side using SQLCMD . But from web page asp.net page user will just click on button which executes store procedure that produce a results i want those results exported into CSV thats thanks for your support. I prefer web page side of things – Dev Jul 15 '14 at 14:14
  • Is this not, therefore, an ASP.net question rather than a SQL question? – franglais Jul 15 '14 at 14:15

1 Answers1

0

If the results are strongly typed (or you can map it to a list of entities) you can use LINQ To CSV library:

http://www.codeproject.com/Articles/25133/LINQ-to-CSV-library

Braulio
  • 1,748
  • 14
  • 23