How send data to FTP site with userid and password?

G

Guest

I need to export various tables and queries to a folder on an FTP site which
needs a userid and password to access. Can I userTransferText somehow or is
there another way? Ideally, I'd like this to be a comma separated values
(.csv) file.

I was able to do an 'add network places' for the FTP site and was able to
browse the folders in Windows (after speciying userid and password). Even
though I specified 'save' for the password, when I pasted the same path into
a TransferText command, it failed with 'internet login failure'. I guess the
userid and password do not get carried over.

Any ideas?
 
J

John W. Vinson

I need to export various tables and queries to a folder on an FTP site which
needs a userid and password to access. Can I userTransferText somehow or is
there another way? Ideally, I'd like this to be a comma separated values
(.csv) file.

I was able to do an 'add network places' for the FTP site and was able to
browse the folders in Windows (after speciying userid and password). Even
though I specified 'save' for the password, when I pasted the same path into
a TransferText command, it failed with 'internet login failure'. I guess the
userid and password do not get carried over.

Any ideas?

You'll need some code or an add-in. I'm struggling with this problem myself at
present, and I'm not sure that this is the only or the best option, but check
out

www.mvps.org/access/mdl0037.htm


John W. Vinson [MVP]
 
G

Guest

I was able to do FTP uploads to a password protected FTP server with no
problem using Dev Ashish's Internet Transfer Library. My only question was
how best to use it to do multiple transfers, as his sample code is doing a
separate connection for each upload, which seems like it should not be
necessary.
 
J

John W. Vinson

My only question was
how best to use it to do multiple transfers, as his sample code is doing a
separate connection for each upload, which seems like it should not be
necessary.

That's exactly the problem I'm having. I just got a message from MVP Dirk
Goldgar on another forum with a modification of the code but haven't had time
to investigate it yet.

John W. Vinson [MVP]
 
G

Guest

Interesting stuff. I need to look at this soon myself, and am no accomplished
programmer.

For what it's worth, i am considering buying an ftp client add in,

http://www.marshallsoft.com/

I also have vb6 which has ftp, but not very experienced. I could add a
reference into Access from the ocx, but ideally I need a standalone app to
manage the transferring as a service. Doing this in vb6 for me is new
ground...

For some general info look at

http://www.ftpplanet.com/ftpresources/ftptech.htm

Please post here how you go.


swas
 
D

David W. Fenton

For what it's worth, i am considering buying an ftp client add in,

I would never spend money on something like that -- it's just way to
easy to use the standard Windows FTP client with a script written
on-the-fly.
 
G

Guest

I don't know anything about FTP scripts, but I'll research it to see if it's
a viable alternative.
 
G

Guest

OK, I made some ftp scripts, tested them in the dos window, they worked.
Ran them from code in Access, they worked.
I'm using the Shell command, ShellandWait comes back as 'invalid function',
what and where is it?
Is there any way to capture errors from the ftp command using this method?

here is shell command in Access:
varX = Shell("FTP -i -s:K:\Access\SQA-Tool\FTPsingle.txt")

here is my script:
Open 171.68.45.21
dsazftp
password
bin
cd weekly
lcd c:\exports\sqa
put SQA_20070606_tblDefects.csv
quit
 
D

David W. Fenton

I'm using the Shell command, ShellandWait comes back as 'invalid
function', what and where is it?
See:

http://www.mvps.org/access/api/api0004.htm

Is there any way to capture errors from the ftp command using this
method?

I don't know. You'd have to look at the help for FTP. Maybe it's
possible to redirect the output from the FTP program into a file
that you could read upon the termination of the script.
 

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