Discussion Locked

Export SQL Data to Flat File in ASP.NET

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to create an simple web app that will allow our client to query a SQL database and then export the returned recordset to a flat file.

I am using ASP.NET to develop this app.

In ASP.NET, how can I take a returned recordset and save the info to a flat file on the user's computer?

Any help would be greatly appreciated.

Thanks!

Bob Gibilaro

3 replies

by amanabala

Bob,

I worked on a similar project and I found the following article at Microsoft site very helpful.

"HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using Visual Basic .NET"
http://support.microsoft.com/default.aspx?scid=kb;en-us;308247

The sample code will create a comma delimited file with extension ".xls" You can change the extension as you need.

Hope this helps.
Ravi
ananth_manabala@yahoo.com

by bgibilaro

Ravi,

This worked perfectly. (Easy too!) Thank you so much for your help.

Bob Giblaro

This discussion is closed to new replies.