Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ftp Download via MAcro/Code???

Posted on 1997-10-08
8
Medium Priority
?
217 Views
Last Modified: 2006-11-17
I have some data files on a UNIX system that I would like
to download as part opening the database, (ie. in the Autoexec macro).  I have some experience with coding VBA (this is for Access95/97), and was wondering if anyone knew how to automate the ftp download process of these data files.  Its through a network, so no modem stuff is required.  Any ideas or thoughts????
0
Comment
Question by:mfischer2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 3

Accepted Solution

by:
chapie earned 520 total points
ID: 1956905
I have an application that launches the 'net' command to grab the system time of our server so they can all be synced, so you sould be able to use the same method to use the ftp command that comes with Win95, you just need to fill any paramaters that might be required...try something like the following:

Dim MyCmd
MyCmd = shell("ftp \\server_name\File")

and insert into the quotes the username and password if any are requried

I do have 1 warning that I have not been able to circumvent, which is there is a new app created in the task list called 'mycmd' whenever this app is launched, and if they launch the app several times without re-booting they all hang in  memory, even if I insert a MyCmd = nothing into the lines of code that I use, so if anyone else has a better way please post
0
 

Author Comment

by:mfischer2
ID: 1956906
2 Questions for you:

1.  Whats the syntax to login thru command line ftp?  I didnt follow where to put the username and password

2.  Does that return the actual text data into a variable called MyCmd or what?  (excuse by VBA, its a little rusty)

This is a good start for now!   I will also let you know what I discover about getting rid of the application icon.
0
 
LVL 3

Expert Comment

by:chapie
ID: 1956907
well, it's not actually an application icon, it's a task that shows up when you press ctrl-alt-del and you can kill it that way.

I'm not sure why VBA reuires you to use a variable when shelling out, but that's the way it works, you simply Dim a variable name and use it in the shell command, there's nothing anymore I can tell you except that it works nd that's as far as I've taken it

the syntax for ftp, good question I don't use the command line, I usually use a 3rd party utility (FTP client), but you can use the 1 that comes with Win95 (a path would probably be best since users could have a client installed)....I'll ask my co-worker tomorrow the proper syntax...he loves command lines as opposed to 3rd part software, so he'll know, he does it all the time at work, instead of loading an app, just typing it in at a dos prompt


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mfischer2
ID: 1956908
I follow.  Let me know about ftp.
0
 
LVL 3

Expert Comment

by:chapie
ID: 1956909
well, I asked my co-worker and he doesn't know how to launch an ftp session with 1 command, instead he'll enter the server, then the log-in requestino returns, etc.

Let me see if we can circumvent that problem with a different type of solution, 1 you might not like since it could require the user to click a url on a form that pops-up.

Create a simple form that starts when the DB is opened (using the AutoExec macro, not the startup option, if you already have one there, that's how I open multiple forms since the startup option only allows 1 to be auto opened), then add a url - all I did was put a label on a blank form, and fill in the URL property.

Now, all you have to find out is what the syntax is for logging someone into FTP through HTML, and since I don't have an FTP server that anyone could log into I don't know that syntax but it should be easy enough to find out
0
 

Author Comment

by:mfischer2
ID: 1956910
Thanks!  I have 2 solutions that might work now.

URL on a form.

FTP download via the Autoexec macro (I will probably get a new client that allows using a script file).  

This is a great start.


0
 
LVL 1

Expert Comment

by:arimsoft
ID: 1956911
In VB5.0 there is ActiveX "Transfer Protocol..."
Use it and read help (F1)
It's easy.

Welcome to MAUG!
http://www.arimsoft.ru/msaccess/
0
 
LVL 3

Expert Comment

by:chapie
ID: 1956912
that's right, I've forgotten about ActiveX and the "FTP"/"Transfer protocol" or whatever the control is named (depending on which manufactuer, since I'm sure there are several controls out there that would do the same)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question