Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transmitting Data
Message
From
13/06/2001 16:32:27
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00517983
Message ID:
00519057
Views:
15
>let me ask you this:
>
>I think I have a fair idea of how to update the data on the main
>office PC once I actually get the data
>
>My problem lies in
>
>1 - How to actually create a connection, like a dial-up, or to
>detect the presence of a connection
>
>2 - Physically transmit the file(s) to the main office Pc, and...
>
>3 - How to know, on the main office Pc that a file has been received.
> Or, beyond that, how to know that the remote PC is in the process
> of transmitting, and then doing something to receive.
>
>Any ideas?
1) there are probably plenty of vendors, but i use the RASX control from Mabry
   to create the dial-up connection.  is is part of Mabry's Client Internet
   Pak and not too expensive.  you may not need to, but i manually create
   a dial-up connectoid, then in the code, the RASX refers to that
   connectoid (and can dynamically update information, such as phone number,
   username, password, etc).   this controls lets you PROGRAMATICALLY

     a) establish the connection,
     b) determine whether or not you are still connected,
     c) disconnect etc.

   not to make your options any more confusing, but in that same Client
   Internet Pak, is included an FTP control.


2) as for actually transferring files, this is what i do (and it's not the
   only option)....  i have, say 3 clients, and each client has maybe
   5 - 15 different computers that will be connecting to my server.  on
   the server, i created an account group for each client.  each individual
   is of course designated to be a member of the appropriate client account
   group.  i create a "transfer" directory.  under that directory, i create
   a directory for each client, and set permissions, so that only that
   client can access that subdirectory.  then i share each directory, again
   setting share permissions, so that each client can only access the
   one directory.

   in the code, once i have established the dial-up connection, i can
   transfer files in either direction, using the vfp COPY FILE command.
   use regular drive & path name style for client side filespec, and
   UNC style naming for server-side files. 

   e.g. 

   Server_File_Spec = '\\MYSVR\CLIENT_A_SHARE\My_Fox_Table.DBF'
   Client_File_Spec = 'C:\MY_APP\MY_DATA\My_Fox_Table.DBF'
   COPY FILE (Server_File_Spec) TO (Client_File_Spec)      && server to client
    or
   COPY FILE (Client_File_Spec) TO (Server_File_Spec)      && client to server

   [ as mentioned above, your other option is to FTP files back and forth, ]
   [ which would work just as well.  depending on how many simultaneous    ]
   [ connections you want to allow to your central computer, you can set   ]
   [ up one or more FTP directories with appropriate permissions.          ]


3) > How to know, on the main office Pc that a file has been received.
   > Or, beyond that, how to know that the remote PC is in the process
   > of transmitting, and then doing something to receive.

   decide first, whether you want the remote pc to initiate the procedure,
   or whether you want the central computer to initiate the procedure.
   either is ok, but generally central office computer is ALWAYS left up
   and running (because it is frequently a server).
   for simplicity, the process should be driven entirely by the remote
   pc or entirely by the central office computer.
   part 2 showed how to transfer files (let's assume under control of
   the remote pc).  you know that the file has been completed when
   control returns from the COPY FILE command.  you should trap for
   errors at this point, by using the ON ERROR.

   as for having the remote pc make something happen on the central
   office computer, once that file transfer has been accomplished,
   you could use RPC (remote procedure calls) as mentioned in previous
   messages.  i.e.  from your remote pc, you can cause a program on
   the central computer to run, which will do your processing.
   if you decide to use that method, i can probably point you to
   documentation.
patrick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform