Results 1 to 6 of 6

Thread: [resolved] Problem with FTP Rename

Hybrid View

  1. #1

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Problem with FTP Rename

    Thanks for the replies.

    Its making the error 2 (file not found I think in dll errors) for Renaming a file and for deleting a file. This, to me, suggests that windoze is (for some reason) looking for the file which has just gone although there is no handles for opening it held.

    As to the ByVal, byref bit I know what they mean, however it is unclear in MSDN as all their examples and descriptions are for C++ ... and not for vb/vba. Its just that if you put a byref and it should be byval it kills Access. An I was searching for info for vb stuff, which came across a site with declarations etc in vb code, but contradicted MSDN with the sub function and some of the references.

    Anyway, as it is actually deleting/renaming but erroring as a missing file, I've ignored the error. My main concern was that this does not impact further on in the program, but the Access as FTP is working fine now.

    At least as a single connection download. Not sure I should venture into the multiple connection downloads...

    Thanks for the AllApiNet example... Its one I used the first time around when the ftp openinternetfile for downloading etc didn't work, probably due to using the wrong flags.

    BTW - long or bolean won't matter. if it fails it will be 0 in either case. It only matters with the handle being returned

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Problem with FTP Rename

    Quote Originally Posted by Ecniv
    BTW - long or bolean won't matter. if it fails it will be 0 in either case. It only matters with the handle being returned
    It won't return a handle it only returns TRUE or FALSE. However TRUE is cast as 1 in the APIs not -1 as in VB. However VB will convert that for you. There is another difference and that is that the BOOL datatype is a 32bit integer (a VB long) while a VB boolean is a 16-bit integer.

    However don't check the last error unless the function returns false.

Posting Permissions

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



Click Here to Expand Forum to Full Width