Results 1 to 6 of 6

Thread: FTP from access

  1. #1
    Join Date
    Jan 2004
    Location
    Slovakia
    Posts
    32

    Unanswered: FTP from access

    Hello,

    I need help with using wininet.dll from my Access 2002 VBA code... I have never used before "external" dll functions, so please tell me, where to start...

    Thanks
    (sz)Tomi

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Please find attached the code for a VB FTP class that you can use.
    Attached Files Attached Files
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Mar 2004
    Location
    Slovenia
    Posts
    56

    Cls

    I insert the class! What about now! Could you paste an example of using the class. Because I am not so familiar with using classes...

    But it looks very interesting....
    Back to the basics...

  4. #4
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Sure no problem. Here is an example of using this class. You put in your own HostName, UserName, Password, FileName, Directory etc...

    Code:
    Public Sub FTPFile()
    
    Dim MoFTP As cFTP
    
    On Error GoTo ErrorHandler
    
        Set MoFTP = New cFTP
        With MoFTP
            .Host = m_sFTPHost
            .User = m_sFTPUser
            .Password = m_sPassWord
            .Connect
            .Directory = m_sFTPDirectory
            .PutFile "C:\FileTitle.doc"
            .Disconnect
        End With
        Set MoFTP = Nothing
    End If
    
    Exit Sub
    ErrorHandler:
    MainErrorHandler
    Set MoFTP = Nothing
    
    End Sub
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  5. #5
    Join Date
    Mar 2004
    Location
    Slovenia
    Posts
    56

    Ftp

    thx, very usefull
    Back to the basics...

  6. #6
    Join Date
    Aug 2004
    Posts
    1

    Unhappy Error

    Hi,

    This looks like exactly what I am looking for, but I get an error. I imported the class to Microsoft Access 2004. When I used the code sample to test it (obviously I used my server details), I get the following error:

    Compile Error:

    Arguement Not Optional

    on the line ".PutFile c:\test.txt" (or whatever file I put there).

    Can you give me any suggestions.

    Regards

    Vicky

Posting Permissions

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