HP3000-L Archives

November 2003, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Mon, 17 Nov 2003 18:00:58 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Paul writes:

> The VBasic application is hiding from the user the fact that FTP is being
>  used to process the data.  The user merely presses a button and the
>  application establishes the needed connection to the server, transfers the
>  data and tries to submit the remote job.  So the user does not see any
>  'ftp' prompts, nor is he allowed to issue any of the ftp commands.
>
>  The application is using the library "wininet.dll" which contains a number
>  of 'FTP' methods (FtpGetFile, FtpPutFile, etc..).  It also has the method
>  'FtpCommand' that is intended to be used for transmitting 'non standard'
>  commands to the host.  That is the method being used to send the 'site
>  stream' command.  The application IS successful in uploading the data file,
>  but seemed to fail during the invocation of the 'FtpCommand' method.
>
>  After finding some examples on the web about the correct declaration of the
>  method we decided to 'back track' and see if the problem exists somewhere
>  else.  It seems that the problem may exist on the HP3000 server (this
>  server is not directly under our control), since when we tried to manually
>  replicate the connection and 'site stream' actions issued by the VBasic
>  application we got the following error:

This isn't going to be an exact duplicate of your problem, but I just wrote
the following VB code in a clickable button:

Private Sub Command1_Click()
  FTP1.RemoteHost = "192.168.1.1"
  FTP1.User = "mgr.ps"
  FTP1.Password = "xxxxxxx,xxxxxxx"
  FTP1.Action = ftpLogon
  Debug.Print FTP1.Connected
  FTP1.Command = "site stream testjob"
  FTP1.Action = ftpLogoff
  Debug.Print FTP1.Connected
End Sub

We use an FTP OCX "control" (a fancy name for a DLL) from IP*Works for our
software. That OCX is called by default "FTP1". Among the various properties of
the OCX are RemoteHost, User, Password, Action, and Command, which are the
only properties I used in the example above.

While you would want to do more error checking in commercial quality code for
exceptional conditions, the code above does exactly the same thing that I
wrote before, very quickly and efficiently.

The Command property in IP*Works is the equivalent of Windows' quote command
verb.

Wirt Atmar

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2