Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    115

    Unanswered: XP_FILEEXIST bug for FTP file?

    I have an FTP servers for me to download daily transaction files.

    I was trying to do some testing to see if a particular file exist, so that I can load it to the data base.

    I am using the following command:
    EXEC XP_FILEEXIST 'c:\downloads\abc.txt';

    where abc.txt is the file downloaded from the FTP server, through FTP Master Professional.

    I got an interesting problem here. If the file is copied from somewhere else and place in c:\downloads\ , XP_FILEEXIST returns 1 (exist). However, if the file is direct FTP from the server to the download folder, the XP_FILEEXIST returns 0(not exist) instead of 1(exist) although the file is physically there!

    is it a bug of XP_FILEEXIST?

  2. #2
    Join Date
    Mar 2005
    Location
    Netherlands
    Posts
    280
    Are the security setting of the file correct so SQL is allowed access to the file? Try comparing the settings of the FTP-file to one you copied.

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    While looking for something completely different, I stumbled across this.
    It seems to address your issue.
    http://www.databasejournal.com/featu...le.php/3492046
    Inspiration Through Fermentation

  4. #4
    Join Date
    Oct 2006
    Posts
    115
    hi RedNeckGeek , i actually started using XP_FILEEXIST after reading that article , right now I need to set the security of c:\download to be free for all, otherwise, the file status is always returned as 0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •