Record Locking - Paradox tables ??? 
Author Message
 Record Locking - Paradox tables ???

I'm new to delphi, so my problem may not be problem at all

I'm using NW4.1, BDE 2.52, delphi 1.0.
BDE (IDAPI) installed locally, but NETDIR points to the same directory
resides on the server.

I have a test application : only TTable, TSource and TDBGrid and TDBEdits
and navigator.

WHY ?

When i do table1.edit on some record on machine1 i CAN DO IT on the same
record on machine2 ????

I've expected that when i do table1.edit on machine1 nad machine2 (on the
sama record) - AN EXCEPTION OCCURS. WHY ?

I have used to Clipper - When i do - tableName->(RLock())
on locked record i got - ERROR - LOCK REQUIRED !!!!

Please help me understand DELPHI record locking !!!!!

Mike



Sat, 19 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

NO SUGESTIONS ?

Mike



Mon, 21 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

I've read all help files, but I've found nothing.
Please help me !



Wed, 23 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

Quote:

>I'm using NW4.1, BDE 2.52, Delphi 1.0.
>BDE (IDAPI) installed locally, but NETDIR points to the same directory
>resides on the server.
>I have a test application : only TTable, TSource and TDBGrid and TDBEdits
>and navigator.
>When i do table1.edit on some record on machine1 i CAN DO IT on the same
>record on machine2 ????
>I've expected that when i do table1.edit on machine1 nad machine2 (on the
>sama record) - AN EXCEPTION OCCURS. WHY ?
>Mike

I'm looking in the VCL's sources and the code of EDIT lock the
record... I don't understand why it don't work.

procedure TDataSet.Edit;
begin
  if not (State in [dsEdit, dsInsert]) then
    if FRecordCount = 0 then Insert else
    begin
      CheckBrowseMode;
      CheckCanModify;
      DoBeforeEdit;
      UpdateCursorPos;
      Check(DbiGetRecord(FHandle, dbiWriteLock, ActiveBuffer, nil));
      GetCalcFields(FActiveRecord);
      SetState(dsEdit);
      DataEvent(deRecordChange, 0);
      DoAfterEdit;
    end;
end;

The BDE function DbiGetRecord  lock th Record !!!!



Thu, 24 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???


Quote:
>I've read all help files, but I've found nothing.
>Please help me !

Locking works just as you would expect on Delphi, except that it is
broken on local tables.  Unless, that is, you jump through hoops to
get it to work.  At the very least, you have to use BDECFG to turn
LOCAL SHARE true on all computers, make sure that all computers use
the exact same mapping to access to databases (which means mapping to
the root directory if you run the app on the computer holding the
tables), and have your NetDir set in your alias.  Even then, cross
your fingers.  That's why I bailed on the BDE and bought Apollo.


Fri, 25 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

Quote:

> I'm looking in the VCL's sources and the code of EDIT lock the
> record... I don't understand why it don't work.
> The BDE function DbiGetRecord  lock th Record !!!!

I've tried everything..... (NO SUCCESS !!!!!)

but my friend has observed :

when you do table1.Edit (on machine 1) and you do the same on machine 2
(locking the same record)
everything is OK(or let say bad) NO EXCEPTION but
when on machine1 you change the record and do Table1.Post and on machine2
also change the record (no refreshing before) and do table1.Post
an EXCEPTION OCCURS !!!

Think it yourself .... and send me answer please !!!!

cheers Mike



Sat, 26 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

Quote:

>when you do table1.Edit (on machine 1) and you do the same on machine 2
>(locking the same record)
>everything is OK(or let say bad) NO EXCEPTION but
>when on machine1 you change the record and do Table1.Post and on machine2
>also change the record (no refreshing before) and do table1.Post
>an EXCEPTION OCCURS !!!

It's like with Lotus Notes, two users can have a record in Edit mode.
But only the first who post WIN...
It's strange but not so stupid.... When you lock a record it's must be
for the shortest time you can. And for a projet the chance of a
conflict is very small...
Perhaps somebody from Borland can explain the mechanism of LOCK...

A+



Sat, 26 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???


Quote:


>>when you do table1.Edit (on machine 1) and you do the same on machine
2
>>(locking the same record)
>>everything is OK(or let say bad) NO EXCEPTION but
>>when on machine1 you change the record and do Table1.Post and on
machine2
>>also change the record (no refreshing before) and do table1.Post
>>an EXCEPTION OCCURS !!!

>It's like with Lotus Notes, two users can have a record in Edit mode.
>But only the first who post WIN...
>It's strange but not so stupid.... When you lock a record it's must be
>for the shortest time you can. And for a projet the chance of a
>conflict is very small...
>Perhaps somebody from Borland can explain the mechanism of LOCK...

>A+

I am having a simmilar problem.  My problem is the machine 1 was mapped
to drive F:  while machine 2 was mapped to G:.  in this sitiation I
could edit the same record on both machines.  If I re-mapped either
machine so that both are mapped to the same drive things started to
work properly.  What am I missing.  Does the IDAPI require that all
users be mapped to the same drive letter?

This can be very anoying in peer-to-peer networks like Lantastic,
win95, etc.

Thanks in advance
Jose R. Nebro



Sun, 27 Dec 1998 03:00:00 GMT  
 Record Locking - Paradox tables ???

SORRY 2 EVERYBODY !!!!

During my tests I was using TBEdit's, DBNavigator .....
and now I realize that when you type a single letter in DBEdit, DBEdit does
Post automaticaly, so there were no locking conflicts.

When I do : no DBEdits, just Edit and Buttons (on Click assign Edit and Post)
and I push Button "Edit" on machine1, and after that on machine2 do the same
AN EXCEPTION OCCURSS !!!!!  VICTORY !!!!!!

Sorry for complains about BDE record locking but I'm newbie

CHEERSS Mike



Mon, 28 Dec 1998 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Locking records within Paradox Tables

2. Locking paradox tables/records ?

3. REQ: Insert records in Interbase table from Paradox table

4. How can I lock a record? (Paradox 7)

5. Paradox OF THE UN-LOCKING RECORDS

6. how to LOCK Paradox record ?

7. How to lock a Paradox record ?

8. Paradox record locking from Delphi

9. Paradox record locking

10. Paradox record locking system

11. Paradox record locking

12. REQUEST INFO - Paradox Global Record locking - COMPU-SERVE

 

 
Powered by phpBB® Forum Software