471,070 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,070 software developers and data experts.

How to Export sql data to text file in web page

Hi.

have someone can give me some idea how to start.
the thing i want do is using web page export the sql data to text file then
let user download.
eg. the webpage has one button. when user click that button.
the webpage will go to database generate data and then export to text file.
and user will download that text file.

Thank You

Jul 24 '07 #1
2 2616
On Tue, 24 Jul 2007 11:10:27 +0200, Ng <Ng@discussions.microsoft.comwrote:
Hi.

have someone can give me some idea how to start.
the thing i want do is using web page export the sql data to text file then
let user download.
eg. the webpage has one button. when user click that button.
the webpage will go to database generate data and then export to text file.
and user will download that text file.

Thank You

You can use Using an SqlDataAdapter to read the sql data to a DataSet, you can then use DataSet.WriteXml to produce a text file of the data.

--
Happy coding!
Morten Wennevik [C# MVP]
Jul 24 '07 #2
HI.
Thank you.
i go check that 2 function first

"Morten Wennevik [C# MVP]" wrote:
On Tue, 24 Jul 2007 11:10:27 +0200, Ng <Ng@discussions.microsoft.comwrote:
Hi.

have someone can give me some idea how to start.
the thing i want do is using web page export the sql data to text file then
let user download.
eg. the webpage has one button. when user click that button.
the webpage will go to database generate data and then export to text file.
and user will download that text file.

Thank You

You can use Using an SqlDataAdapter to read the sql data to a DataSet, you can then use DataSet.WriteXml to produce a text file of the data.

--
Happy coding!
Morten Wennevik [C# MVP]
Jul 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Thomas 'Skip' Hollowell | last post: by
14 posts views Thread by atse | last post: by
1 post views Thread by frankvfox | last post: by
2 posts views Thread by PerryC | last post: by
13 posts views Thread by Hemant Sipahimalani | last post: by
7 posts views Thread by Vanessa | last post: by
1 post views Thread by forumaic | last post: by
3 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.