Saving datatable on client PC

J

Jim Andersen

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
 
K

Ken Cox [Microsoft MVP]

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top