Solved

Paradox Locks - removing

Posted on 1998-07-27
12
346 Views
Last Modified: 2010-04-04
Hi All,

Any tips on how to remove the locks Paradox puts in place when using a Table?  We have tried using a TSession component with the TQuery - no problems, but the TTable  components just wont move the locks to the private directory.

Cheers!

Stu.
0
Comment
Question by:SJohnson
12 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358725
Hi SJohnson,

Don't think it's possible. Except of copying the table, so you've got two tables and when program closes just move the changed, new records back to one table... but this is NOT REALLY a solution.

Zif.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1358726
Hi Ziff,

If there isnt a way of doing, how do you make Paradox multi user then?  I know this sounds really ignorant, but Im pulling my hair out!!!   We run the app on one PC, no probs, run it on another PC, and it says that the databases are locked and the program terminates.

Thanks for the info regardless.

Stuart.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358727
Well, I never used Paradox multi-user way... Let me look at it closer. Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358728
Hi SJohnson,

already had a look at this article?

http://www.inprise.com/devsupport/delphi/ti_list/TI3160.html

Zif.
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1358729
SJohnson

The Database desktop is loaded on every machine i take it...you need to configure it to all point at the network file in the paradox path for instance all the machines should be mapped to the directory that contains the network file then all the paths must be set to G:\(mapped drive) this should allow multple locks of the same prog...

Later
BoRiS
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1358730
Ziff,

No, I havent had a look at it, but I will!  Thanks.

I dont really care what we use as a database, its just I thought Paradox was supposed to be multiuser :)

Thanks anyway mate.

Stu.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1358731
hear is a solution :

 * I also refer to : the article at Inprise
 * BoRiS comment

I've created a multi-user application in Delphi that accesses Paradox tables. But I'm having a problem setting them up to run
                  successfully on a network.

                  A Short Story

                  Here's a make-believe but all too common scenario for those of you who are new to Paradox tables:

                       You've just finished final testing of a local database application on your machine, and you're ready to deploy it to other
                       workstations on your LAN. Knowing that your users will be needing the Borland Database Engine (BDE) to run the
                       application, you install the BDE on each user's machine, add the appropriate database aliases and create an icon on their
                       desktops that points to your application. Satisfied, you tell the users to go ahead and take the application for a spin and that
                       you're going out to lunch. You're confident in the knowledge that you've created a virtually flawless masterpiece (it's got to be a
                       masterpiece, considering the overtime you put into finishing the job). You go out to lunch and order a big steak in
                       congratulations to yourself for a job well done. Today, you think, I'm going to take a really long lunch and revel in my
                       victory. Isn't life wonderful?

                       Upon returning to your desk, you notice that the message light on your voice mail machine is blinking furiously. Must be the
                       folks in marketing congratulating me, you think. So you happily dial into voice-mail to listen to your messages. The dry,
                       computerized female voice informs you that the first message came not five minutes after you left for lunch, and it's from the
                       head of the marketing department. Your heart sinks as you hear the message.

                       Hi, Tom. This is Mary Malone in marketing. I'm calling to tell you that the application you installed is crashing when
                       more than one person accesses it. This isn't good because we have to enter the information into the computer by
                       quitting time today so we can run our reports in the morning for submittal to the planning department. I'm thinking
                       that if this one thing's wrong, what else is? Sorry for being a little miffed about this, but you need to fix it as soon as
                       possible. Can you call me back and tell me when you're coming over? The rest of messages say essentially the same thing.

                       When you call Mary back, you find out that the error messages that come up are "Directory is locked by another user." or
                       "Cannot open table. Table is locked by another lock file C:\PRIV\PARADOX.LCK". How can that be? you ask yourself.
                       I've never seen that error before. What am I gonna do...

                  Does the above sound familiar to you? While a bit on the hokey side, it's not as far-fetched as one might at first assume. But there is a
                  solution to this problem.

                  The Solution

                  Networking Paradox tables is not that difficult. In fact, when I tell you how, you'll flip over how insanely simple it is. Here's what you have to
                  do:

                    1.Open up Explorer or File Manager and create a new directory that is accessible to all users, making sure that they have both read and
                       write privelges to it. For clarity's sake, name it PDOXNET.
                    2.Go to a user's machine that has the BDE installed on it.
                    3.Open up the BDE Configuration Manager. For Delphi 1.0, this is the IDAPI Configuration Manager.
                    4.In the Driver Name list, select the PARADOX list entry.
                    5.In the Parameters fields, click on the field entitled NET DIR.
                    6.Type the fully qualified name of the directory you created on the network into this field.
                    7.Save the configuration and exit the BDE Configuration Manager.
                    8.Repeat steps 2 through 7 for each user's machine on which the BDE is installed.

                  You must go through each of these steps, for a very good reason: The BDE has to know how to manage access to shared resources by
                  multiple users. It does this with a central network control file called PDOXUSRS.NET, which is essentially a binary table that contains
                  information about a specific user accessing a table. Its purpose is to keep a user count and tell the BDE who has what resources in use at
                  any time. But the most important thing about this is that there can only be one of these files on the network at any time, and each user that
                  uses the BDE must point to this file. Otherwise, the BDE will not know how to manage the users, and you'll get the error messages that were
                  mentioned in the story above.

                  Written by Brendan Delumpa on 3/19/97.

0
 
LVL 1

Author Comment

by:SJohnson
ID: 1358732
I'll check this out ASAP.  If this works, is there anyway we can do this with a setup program that you know of?  It seems a bit harsh to expect our installers, who configure around 30 machines a day, to do this.  If there is a way, it would be great to know, otherwise, I'll just have to add it into the manual for another set of install steps.

Many thanks,

Stuart.
0
 
LVL 3

Expert Comment

by:d4jaj1
ID: 1358733
One way to do this 'automatically' is to have your program set the private & working directory - instead of configuring each users machine.  On the onCreate event of the main form, use BDE calls to set the directories to the MAPPED drives.  This way, you know everyone's setup will work the same way.  This of course assumes everyone has the same mappings & drive letters on their system.

Sorry, don't have the code to set it now, but I've seen it on teh Inprise & Cobb sites.  Good Luck.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1358734
Thanks d4jaj1.  I'll pass that on as well.  I think we can manage that by saving the paths into the registry when doing the install, and then just read it from the registry each time the app is run.

Cheers!

Stuart.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1358735
Thanks for that, all of you.  Problem fixed and working perfectly.


Stuart.
0
 

Expert Comment

by:jay-jones
ID: 8253343
Me too had this problem!!! Thanx for such a clear explanation. (And amusing storyline!)

Jay.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now