Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paradox 4.5 (DOS) file sharing

Status
Not open for further replies.

WaltW

MIS
Jun 14, 2000
130
US
I have 3 users on a peer-to-peer network using Windows 95 and Paradox 4.5 DOS. They've been humming along fine until recently, when one of the 3 PCs had some file corruption, and Paradox 4.5 had to be re-installed. Ever since then, I can't get the file sharing to work properly. Paradox allows two users to edit a file at the same time, which can obviously lead to disaster. It's been so long since I worked with Paradox 4.5 and set up this network that I can't for the life of me remember what the trick is to get a data file locked when in use so other users can read but not edit it. Can anyone help? Can anyone remember that far back? :)

Any suggestions would be greatly appreciated!

Walt Wright
 
Don't know about the DOS version but in windows :
In the IDAPI.CFG file (or the config file in use) make sure that the NETDIR path is the same on all PCs. The drive letter is the only thing that can be different. Also, since this is a peer-peer network, Share should be set to LOCAL on the PC with the tables, but I suggest on all PCs (performance is so good now).
Never used 4.5 DOS but hope this helps.
 
Paradox should automatically place locks on the tables based on the operations that are being performed. If you are uncertain about this, set up a test: create a table and allow two users to co-edit it at the same time.

"Co-Edit" means what it implies. More than one user should be able to access a table at the same time.

Of course, in the real world, there can be complications. That's why the old-timers set up scripts to LOCK tables for single-user access. One possible complication might arise if User#2 decides to edit a table while User#1 is trying to print a report based on a query of the table. The results could be unpredictable but probably not catastrophic.
 
I love Paradox 4.5 for DOS, I like it more than Access in many aspects. I continued the programming of a 500MB+ Paradox 4.5 for DOS database for a Hospital (some tables having more than 350,000 records). We used a small capacity network server to provide the services to 15 or more users to share the database. I used the Application Workshop for the menus. I set the tables for co-edit and many users can make changes at the same time to those tables. It refreshed every 3 seconds. Paradox takes care of the locks without extra programming, but if you want to handle the locking you can use the included Pal programming software (using the Script editor). Whenever a table was fully locked it notified the other users that it was and by who, denying access until it was freed. For network installation read the Network.txt file. We simply copied the local PDOX45 directory to the server, separately placed the Data directory in the same server and in the menu to the left of "View" (where the small three horizontal bars are) select "Utilities" then "Custom", then "Standard Settings" and specify the working directory to be the one on the server i.e. G:\APPS\DATADIR. Place a batch file in your server with a path that points to the PDOX45 directory on the server and in the local PCs allow logins to that server and access to the batch file.

Our directories were:
Paradox software: G:\Apps\Pdox45
Data Directory: G:\Apps\Datadir
Batch file for users: G:\Apps\Pdox.bat
Batch file for Programmer: G:\Apps\Pdox45.bat
Our network was called OVEM1

Have a local private directory on each of the local hard drives accessing the program. The batch files create one if it is not there. Set the private directory to be that one in:
(go to the left of View and press the Enter key), then select "Utilities" then "Custom", then "Network", then "Private Directory" and type the name to match the one in the batch file (i.e. C:\PrivDir). If you have stacks errors you can use "-Stack 32" or higher as in the example. If you add the name of the Application Workshop startup script to it then it will start the application. When exiting this batch file will delete the temporary network mappings. Try all this, you have nothing to loose. You can make multiples copies of the database for backup purposes. If a table gets corrupted run the tutility.exe include file to fix it. We had Novel Netware. On NT an Administrator can set autoexec.bat file to contain: files=40 and buffers=40 or higher.

An example of the "PDOX45.bat" batch file is:

MAP P:=OVEM1\VOL2:DATADIR
MAP Q:=OVEM1\VOL2:APPS\DATADIR
MAP INSERT SEARCH1:=H:
MAP INSERT SEARCH2:=Q:
IF NOT EXIST C:\PRIVDIR\NUL MD C:\PRIVDIR
PARADOX -stack 32
MAP DEL P:
MAP DEL Q:
MAP DEL S2:
MAP DEL S1:
CD C:

An example of the "PDOX.BAT" file is:

MAP P:=OVEM1\VOL2:DATADIR
MAP Q:=OVEM1\VOL2:APPS\DATADIR
MAP INSERT SEARCH1:=H:
MAP INSERT SEARCH2:=Q:
IF NOT EXIST C:\PRIVDIR\NUL MD C:\PRIVDIR
PARADOX -stack 32 A_SCRIPT
MAP DEL P:
MAP DEL Q:
MAP DEL S2:
MAP DEL S1:
CD C:
CLS

For more information I can be reached at: Cesarcalifornia@yahoo.com or Cesarcalifornia@hotmail.com

You can visit my web site at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top