468,746 Members | 1,825 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,746 developers. It's quick & easy.

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 2549
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
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.