Path: utzoo!news-server.csri.toronto.edu!rutgers!att!pacbell.com!ames!uhccux!bigtuna!pegasus!tleylan From: tleylan@pegasus.com (Tom Leylan) Newsgroups: comp.databases Subject: Re: some questions on DBASE III + Keywords: make it simple.... Message-ID: <1991Mar13.101820.4102@pegasus.com> Date: 13 Mar 91 10:18:20 GMT References: <20990@shlump.nac.dec.com> Organization: Pegasus, Honolulu Lines: 96 In article <20990@shlump.nac.dec.com> yychow@pasm07.enet.dec.com (yychow) writes: > All below cases are to be assumed in a network environment. > > 1) If I have two applications say prog1 and prog2, and want to > have a main menu (main) to call up either one of them. Do I > need to re-organize all the select area when multiple users > is using the programs???? > > ----- main------ > | | > | | > prog1 prog2 > ----- ----- > select 1 select 1 > use test1 use test2 > > If not so, I shall assume that multiple users will not affect > each other.. Right off the bat you should avoid expressly using any particular workarea and simply use the SELECT 0 construct. This will open the file in the next available workarea. You should refer to workareas by their alias names after you have opened a file there. As for your example as long as you close the files in the same programs that you open them in no problems will develop. Keep in mind that each user executes their own copy of the .EXE file so the only network conflicts can result from rights to the data files. > > 2) For a large application, it is difficult to open all the files > in a different selected areas once.. So if I write for each function > to open the the corresponding required database files and close > them when I finished using them. In a single user-environment, > there will not be any problem, but about when it is in > a multiple users environment, will this approch affect the > users using the system? > > Say I have two users (user1 & user2)and they are working on with > the same application but different functions, will the user1 > affect the user2. > > user1 user2 > ----- ----- > function1 function2 > | | > > select 1 select 1 > use test1 use test2 > > Will the user1 be working on test1, and user2 be working test2 > without affecting each other??? Similarly to answer one... the network doesn't actually know or care what one workstation is running while somebody uses another workstation. The programs are loaded in RAM. If problems develop (and they can) it would be because one person has exclusive use of a file that another use wants or has a file or record lock in place. In the worst case a deadlock can occur when both apps sit around forever waiting for the other app to give release the file lock. There are obvious ways to prevent this and you should try and find a book on network programming. > > 3) I believe many of you have used clipper to compile your application. > From the reference manual, it mentions ones could open up to > 256 areas, i.e., select 1 to select 256... But I have an application > which only open ten database files and 10 indexed files. whenever > it reach to the area 9, it gives me an error message like "error > on open indexed file name_of_file", I have checked the indexed > file, and re-create the indexed file, it still does not work. > Can someone tell me what is wrong with it? By the way, I have set > the following: > > config.sys > ========== > files = 50 > > autoexec.bat > ============ > set clipper = F50 > > This should enable me to open up to 50 files, right !!! > I believe you will find that there is a 255 workarea limit but that only works with DOS 3.3 (or I suppose 4.nn also). Remember that DOS itself uses five handles so I think your example would permit 45 files opened. File handles are used for more than .DBF files, each .NTX requires one and if there are overlay files they require one and .MEM files (if you use them which you shouldn't) and other things use them also. Most importantly if you are on a network, the network may not permit one application to have 255 handles to itself so check your network manual. 3COM is particularly stingy in this regard. Hope this helps tom leylan ex-Senior Systems Analyst - Nantucket Corporation