How to download and upload files from the server?
Posted: Fri 23 Apr 2010 16:27
I would like to connect to a SQL Server located remotely (SQL Server exposed to an external IP) and upload and download documents from a fileserver that is in LAN with the remote server.
I embedded this code in a TMSStoredProcedure
SELECT BulkColumn as MyFile FROM OPENROWSET(BULK '\FILESERVER\SharedFolder\hello.txt' , SINGLE_BLOB) AS X
then from Delphi I cast this as TBlobFIeld and SaveToFile
Can you suggest a way to do the opposite? So saving a local file to the remote \FILESERVER\SharedFolder ?
Thanks.
I embedded this code in a TMSStoredProcedure
SELECT BulkColumn as MyFile FROM OPENROWSET(BULK '\FILESERVER\SharedFolder\hello.txt' , SINGLE_BLOB) AS X
then from Delphi I cast this as TBlobFIeld and SaveToFile
Can you suggest a way to do the opposite? So saving a local file to the remote \FILESERVER\SharedFolder ?
Thanks.