Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi I am developing some application that will be installed on multiple clients. Each client can connect to a SQL database on the server and modify its contents. I am looking a way that clients can copy some files on the server storage using this application, but can not do that using windows explorer or external program. How can I do that? if this is not possible, how can clients tell server to copy their files to the server storage?

Thanks for your answers .
Posted
Updated 14-Jan-11 7:24am
v2

You can setup a FTP server on the server machine, and give each client an account to upload files. .Net has a FTP object you can use as well.
 
Share this answer
 
v2
One possibility is to use the xp_cmdshell command[^] to execute a DOS command, 'Copy' for example.
 
Share this answer
 
Hello,


Your question is a bit unclear do you want to copy files to a server share, or as a blob in your database?

if you want to copy files in a share, You could use the File class:

System.IO.File.Copy(@"c:\myfile.txt", @"\\server\share\myfile.txt");


If you want to copy your files to database have a look at this article showing you how to deal with BLOBs

Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0[^]

Valery
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900