Subject Re: network connection dbase plus
From Michael <michael@abstractservices.com.au>
Date Sat, 13 Jan 2018 23:39:22 -0500
Newsgroups dbase.getting-started

Akshat Kapoor Wrote:

> >>> I will use one of the computers
> >>> as a server, I have a form (.wfm), as I convert it to executable to install it on another computer and work its functions on network, read / write
> >>
> >> I assume you are using .dbf tables
> >>
> >> There are two ways to access tables over the network.
> >> 1. Map the server drive as z: (or any other letter) on all remote
> >> computers. Alter your queries in the form to
> >> select * from \\\"Z:\\\\yourfolder\\\\abc.dbf\\\"
> >> (normally the drive letter included by default is the local drive letter)
> >>
> >> 2.Use UNC path of the server drive. For how to do and use it in Dbase
> >> have a look at the attached file. Your query in this case will be
> >> select * from \\\"\\\\\\\\servername\\\\folder\\\\abc.dbf\\\"
> >>
> >> Apart from setting the proper path for shared tables nothing special is
> >> required in network programming leaving apart one issue of row locks.
> >> But I would prefer to keep it for later.
> >>
> >> For the time being check your form with alterations outlined above and
> >> then you can proceed with alterations to your form for simultaneous
> >> update by multiple users to the same table.
> >>
> >> Regards
> >> Akshat
> >>
> >
> > In the attached image is my form, I want to install it on several computers so that all users can search catalogs (example: NAH292N, NAH2934N)
> >
> >
>
> I will suggest you try the option 2.
> Use google for instructions on obtaining unc path. Try it on any one
> computer.
> Do not alter your form for the time being instead create a small dummy
> form with just the grid and a close button. Use this form for testing
> purposes. This will help you in establishing if network connections have
> been established and working properly.
>
> Option 1 is easier to implement but it requires two versions of the form
> if the form one for server and other for client/remote computer.
>
>
> I had observed one thing that while posting thunderbird altered the
> number of back slashes so adding two queries as attachment both the
> queries refer to the same table.
>
> If you are facing problems in establishing the network connection from
> within the form try executing the query in command window. If your path
> is correct you will not get any error if the path is wrong you will get
> an error of table not found.
>
> It will be easier to try multiple combinations.
>
> There is still another way of obtaining network address. Open the server
> folder in windows explorer and click on the address bar. It should be
> displaying the complete address.
>
> Once you have the complete address and are able to access the file from
> command window / simple form we will proceed to make the app network
> compatible.
>
> Regards
> Akshat
>
> select * from "z:\myapp\tables\catalog.dbf"
select * from "\\servername\myapp\tables\catalog.dbf"

These methods all work but you will find, it will run slow once you increase the users and much more difficult to maintain path names. I would suggest using one as a server, buy  server layer (if you are not using Microsoft server) from say thinsoft and use terminal services to run seperate instances. It will run much faster and easier to maintain path names.

Michael.