Results 1 to 5 of 5

Thread: Network Considerations

Hybrid View

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Network Considerations

    I am developing an application that may be accessed via a local network. what special considerations must I analyze?

    I use CURDIR to retrieve the current working directory. But if someone accesses the program via a network, will CURDIR accurately return the path of the computer from which the program resides, if the program runs on a client?

    IE "H:\Programs\PatientPSA"

    I guess im not really sure how to handle the file creating and saving. I need it to be done on the computer at which the program resides, not where it is run.


    Any help, advice, or just 2-cents please reply...I have no knowledge of how network access may affect the program...

  2. #2
    Tygur
    Guest
    CurDir only refers to the current directory. It is usually the directory your exe is in, but it can change and it doesn't always start out as the location of your exe, so you should be using App.Path.

    App.Path will always refer to the directory the program is running from in relation to the computer it's running from. For example, suppose a computer has c:\TheDir shared and your program is c:\TheDir\TheEXE.exe . Then there's a second computer with that shared folder mapped to drive L. When your program gets run on the second computer, App.Path will be F:\ .

  3. #3

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    thanks

    Thank you, I was unaware of the limitations of curdir.
    As far as the program being run from another network location, will the App.prevInstance routine work to only allow the program to be runing at only one location throughout the network? So two people cannot run the program simultaneously?

  4. #4
    Tygur
    Guest
    App.PrevInstance will only detect other instances on the current computer. For example, if you're running it on your computer and someone else on the network is running it somewhere else, App.PrevInstance will not detect that it is already running. But if you start it up again on your computer, App.PrevInstance will detect the instance you already had open because it's on the same computer.

  5. #5

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Hmm...
    to get around this limitation of app.prevInstance, if all running copies of the program save to the same network path(where the program resides):

    1. Open a random access file at start of program
    2. If its already open, then another copy is running.
    Last edited by nemaroller; Jun 24th, 2001 at 02:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width