473,804 Members | 3,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving datatable on client PC

Hi,

I want to make a backup of some data from an SQL server. The backup should
be saved as an Excell file (or similar, csv or xml...)
So I create a datatable and select the data from SQL server and manipulate
it a bit. No problem.

But how do I save it on the Client PC ?
Do I have to go through an intermediary step of saving it on the server and
then transferring the file (somehow) and deleting the file on the server.

Any help and samples appreciated,

/jim
Jul 14 '06 #1
1 1711
Hi Jim,

As you know, you'll run into a security mess trying to save a file to the
client PC automatically. You could prompt the user to download the content
but that's a pain each time.

How about an alternate method? Get the data out of SQL Server and
automatically email the XML file to a user (or special backup account). If
it's small, it won't be too much to handle.

You could probably create all the content as in-memory streams so you don't
need to go through the hassle of deleting files.

Just an idea...

Ken
Microsoft MVP [ASP.NET]


"Jim Andersen" <no****@nospam. dkwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Hi,

I want to make a backup of some data from an SQL server. The backup should
be saved as an Excell file (or similar, csv or xml...)
So I create a datatable and select the data from SQL server and manipulate
it a bit. No problem.

But how do I save it on the Client PC ?
Do I have to go through an intermediary step of saving it on the server
and then transferring the file (somehow) and deleting the file on the
server.

Any help and samples appreciated,

/jim

Jul 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
15277
by: Buddy | last post by:
Hello, We are using DataTable to store our data that we retrieve from SQL because it provides us with ROW/COLUMN concept. Due to DataTable been memory hungary we are finding that at least 40MB of memory is been created every second which means the GC is concently running. We want to use something else that is not memory hungary and will give us the ROW/COLUMN concept (ie Multi-dimension Arrays).
4
10820
by: John Kandell | last post by:
Hi, I posted this in the asp.net group, but didn't get a response. Maybe someone here can help me with this... --- Would someone be able to shed some light on what is the cost of saving a DataTable to session vs saving a custom object of the same data.
1
3003
by: Steven Thomas | last post by:
Can some one help me find a code snipit for saving the contents of a data set to a comma seperated file? I have created a web service in asp.net that will read the data from a AS/400 DB2 database via a OleDB connection. Then I create the dataset, Now what do I do Here is the function now ------------------------------------------------ Public Function GetTicketData() As DataSet 'Public Function GetTicketData(ByVal varbpno, ByVal
4
5907
by: Sean Feldman | last post by:
Hello, I've installed WSE2 and succedded to download from WebService DataTable object, but can't do the oposite. Anyone can help please? Thanks a lot!
5
5824
by: Mark | last post by:
Hi - I've a data table that I want to save to an external Access database. I'm interested in sample code that would perform this save. Thanks, Mark (VB.NET, .Net framework 1.0)
0
1774
by: Maart_newbie | last post by:
Hi all, I've got a question about returning the value of a pk-column to a DataTable after inserting a row (via a data-adapter) using MySql5. Here is the SQL and code concerned: //=================================================================== // The table
5
5898
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to store a DataTable in any other way outside of our servers. In doing so, we leave ourselves open to large memory requirements. Furthermore, most web pages do not really support multiple changes per transaction. In other words, when the user submits...
0
1314
by: =?Utf-8?B?VG9t?= | last post by:
Folks, I need to send a non-strongly typed DataTable as a parameter through my web service to update the database with the user's changes, and need to return it to the user's client app with any changes the database/MT made. Most important: for new records, the client-side ID of "-1" should be replaced with the database's autoincremented identity value. This DataTable exists on the client side as the "parent" table in a DataSet, with...
2
4469
by: Swys | last post by:
Hi all! I am creating a WCF service (my first). I am going to have a variety of clients, one of which is a PHP client. Now, I've already established that I can return a normal string to the PHP client as wellas an array of strings. I also want to return a DataTable object in such a way that the PHP client will be able to understand the DataTable. Thus far, when a DataTable is returned to the PHP client, the result is one long continuous...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10326
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6851
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.