Groups | Blog | Home
all groups > sql server odbc > august 2006 >

sql server odbc : Encounter Error when FTP get file using tsql


winwin
8/21/2006 12:47:10 PM
Hi,

I have tried to create my procedure by cut and paste the sample FTP get file
using tsql from Author Nigel Rivett (
http://www.nigelrivett.net/FTP/s_ftp_GetFile.html).

When I tried to execute it by passing parameter as below:

exec s_ftp_GetFile
@FTPServer = 'www.mysite.com' ,
@FTPUser = 'mysite' ,
@FTPPWD = 'xxxxxxx' ,
@FTPPath = '' ,
@FTPFileName = 'chat.asp' ,
@SourcePath = 'D:\wwwusr\mysite\web\' ,
@SourceFile = 'chat.asp' ,
@workdir = 'c:\Temp\'

I encounter error ouput as below

1 User (mysite.com:(none)): open www.mysite.com
2 Error opening local file D:\wwwusr\mysite\web\chat.asp.
3 NULL
4 NULL
5 NULL
6 get chat.asp D:\wwwusr\mysite\web\chat.asp
7 quit
8 > D:\wwwusr\mysite\web\chat.asp:Permission denied
9 NULL

Please advise....

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-connectivity/200608/1
winwin via SQLMonster.com
8/22/2006 2:36:14 AM
Hi, Thank for all the reply..my problem solved, is due to wrong parameter
passing.

exec s_ftp_GetFile
@FTPServer = 'www.mysite.com' ,
@FTPUser = 'mysite' ,
@FTPPWD = 'xxxxxxx' ,
@FTPPath = '' , ---Should specify the file directoty at Remote Server
@FTPFileName = 'chat.asp' ,
@SourcePath = 'C:\myftpfile\', -- The source path should be the path the file
will be stored in our local machine
@SourceFile = 'chat.asp' ,
@workdir = 'c:\Temp\'

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-connectivity/200608/1
AddThis Social Bookmark Button