FTP Directory problems

G

gdonald20

Hi

I am trying to directory a folder on our ftp server. The folder is not the
root of the server. I appear to be able to open and connect to the internet
fine but then the code breaks and actually dumps me completely out of access.
Attached below is the first bit of my code.

Dim pData As WIN32_FIND_DATA
Dim lngHINet As Long
Dim intError As Integer
Dim strTemp As String
Dim blnRC As Boolean
Dim bReturn As Boolean

bReturn = FtpSetCurrentDirectory(mlngInetConn, "/1272262SM/Errors")

'init the filename buffer
pData.cFileName = String(260, 0)

'get the first file in the directory...
lngHINet = FtpFindFirstFile(mlngInetConn, "*.*", pData, 0, 0)

After executing the line above, access closes completely. I have plenty of
access experience but this is my first time trying to directory ftp in this
way.

I can post the whole module if required, although some is still in sudo-code
because i couldn't get past this hurdle yet.

Thanks in advance for any help

Gillian
 
G

gdonald20

Hi

Solved this problem myself i stupidly hadn't specified string lengths in my
win32_Find_Data assignments.

I have fixed them and my code now goes through the directory properly.

Thanks

Gillian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top