Solved

Lock Paradox Table

Posted on 2000-04-24
12
455 Views
Last Modified: 2010-04-04
Dear Experts, please help !
        How can we lock paradox table explicitly in a network environment ?
Thanks from apin
0
Comment
Question by:pc_melsa
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 9

Expert Comment

by:ITugay
ID: 2743795
Open it for exclusive.
TTable.Exclusive:=true;
-----
Igor.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2744143
yup, thats it ;-)
just to remark:
set the exclusive-property to true before opening and use
open between a try except block, because the table could be opened
shared or exclusive by another user, which causes that the open fails.
0
 

Author Comment

by:pc_melsa
ID: 2746105
The problem is, if I set the exclusive property to true, another user will fail to share the table. ( they can't even read the table )
Anyway, thanks for the comments !

Best Regards.
apin
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 2746282
hi pc_melsa,

? what wants you ?
lock a table locks the table for other users!
if you want to lock a record, then you've nothing to do as to set the table into edit-state, if the record you want to lock the current record.

meikl
0
 
LVL 1

Expert Comment

by:bozo7
ID: 2749432
meikl is right.
However you do need to make sure that all the users share a netfiledir.

Happy Coding,
Ross
 
0
 

Author Comment

by:pc_melsa
ID: 2758654
Sorry Mr Meikl, the question should be :
When I'm using xbase language in network environment, I can use Flock() to lock and edit the table, while the other users just only can read the table.
Can I do the same with paradox table ?

Thanks from apin
0
 
LVL 1

Expert Comment

by:bozo7
ID: 2759151
Yes you can. If the users share the same netfiledir when the table is put into edit mode the record is locked and all other users can read the record and the rest of the table.

Ross
0
 
LVL 1

Expert Comment

by:bozo7
ID: 2759172
To set the netfiledir use the following code:

session.NetFileDir := 'network drive';
forcedirectories('local drive');
session.PrivateDir := 'same local drive';

Ross
0
 

Author Comment

by:pc_melsa
ID: 2759856
Dear Mr. Ross, thanks for your comment !
      I use Netware 4.2 ( Dos Mode ) as my server operating system, and I put my executable file and table in one directory ( F:\delphi ). I've mapped search this directory, so the files can be shared by all users in their workstation ( using Windows 98 and add shortcut in the desktop ).

My question is :
1. How to make the netfiledir ? Does it ASCII file with no extension ?
2. Since I'm not using local drive, should I add the line 2 and line 3 in the netfiledir ? ( Forcedirectories() and Privatedir )

Thanks from apin


      
      
0
 
LVL 1

Expert Comment

by:bozo7
ID: 2760259
The way that I have done it in the past when the exe is on the network is like this:

forcedirectories(extractfilepath(application.exename)+ '\net');
Session.NetFileDir := extractfilepath(application.exename)+ '\net';
forcedirectories('local drive');
session.PrivateDir := 'same local drive';

This way the netfiledir is always right off the exe and all users will use the same directory. Even if you move the exe it won't be a problem.

Ross
0
 
LVL 1

Accepted Solution

by:
bozo7 earned 100 total points
ID: 2760282
Your second question:
The PrivateDir is where Paradox tables store temporary .sql files (created when a query is ran). This directory can't be shared by all users because they will step on eachothers toes if they do.
I usually use the 'c:\windows\temp' directory. That is on almost any computer running windows.

Ross
0
 

Author Comment

by:pc_melsa
ID: 2763217
Thanks !
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 54
Is anyone willing to have a look through this code and help debug? 25 74
Convert MS Word document to a PDF file 9 78
update joined tables 2 46
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

770 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