473,465 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2740
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Thomas 'Skip' Hollowell | last post by:
My Struts application is attempting to export the contents of a table to a CSV text file. I have gotten this to work in the past but am now having trouble after the export in getting the...
14
by: atse | last post by:
Hi experts, I retrieve data from the database and display on ASP, then I export these data to a file, like Excel (the best) or text file. Is it possible? I think it is possible, but how can I do...
1
by: frankvfox | last post by:
I need a code sample using VB ASP.Net 2003 which exports a tab delimited text file resident on the server into an Excel spreadsheet which will be saved through the browser to the client's local...
2
by: PerryC | last post by:
Is there a way to export an MS Access Report to Word/Excel that looks EXACTLY like it appears in Access? When I export to Excel, only certain data appears, titles, headings... all missing. The...
13
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"...
7
by: Vanessa | last post by:
hi Everyone, I have two questions on exporting data to Excel using ASP (w/o converting formatted excel file into web page and then plug in the dynamic data): 1. Can we export data into...
1
by: forumaic | last post by:
Hello, I am trying to export data to excel from datagrid, and I am getting an error: "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." ...
7
Merlin1857
by: Merlin1857 | last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.