>hi,
>
>What i am trying to do is
>
>Copy the file from server(remote) to the Drive(destination)
>
>There is no Shares of drives.
>
>So i think i need BCP or textcopy for the same . or Might be a C# assembly ?
>
>Will try it with BCP if not will write out a C# assembly.
>
>Any other Ideas ?
>
>Storage:
>
>
>1) Client machine : Different Domain than Server
>2) Can interact only through services with the server.
>3) The file can be a Photo, or Fax doc ,or something like
>4) The file name (with path) is stored in the Server for retrival of the Image or Photo
>
>something like "Select * from openrowset(BULK 'PATH',single_blob) as A
>I also tried "Insert into openrowset('MSDASQL.1,'c:\';'';'','c:\test\data.jpg') select f1 from ##foo1 " with the Microsoft Text driver
>
>5) I want to do the reverse. of the select ; Write to the file.
>
>6) think of the control You will get. Infact updating the server would be easy , without the use of FTP or something else(of course you will need to be logged in with admin prev or atleast must be able to see the drive)
>
>
>Suhashegde
Suhas,
I'm not sure I understood:) If you mean you're trying to write out to a disk file on server that you don't have access (since I don't know how to use bcp):
-I would go with a C# assembly marking it unsafe that would write the file out and add it as a procedure (IOW a C# based procedure in SQL server).
-Try SQL2008 which has the capability of specifying external path for image storage rather than in database itself. Files would be already on the disk and there are ways accessing lowlevel (SQL2008 docs detail how to do).
If it's not about writing files on to disk on server than you could do it with SPT,ADO. Since the code I pointed didn't help I assume you mean writing the file out to disk on server.
Cetin