| Author |
Row Locking in Native Dbase .dbf files
|
|
| Gary Smit 2006-02-28, 8:25 pm |
| I am running an app in a network environment. I have a database file that is linked with a few other .dbf files. When one user is in a form and changes a datalinked field, the rowset goes into edit mode and the row that is being edited is locked. The p
roblem I have is that while this user is editing this row, another user who wants to edit a different row in the database get an error that the rowset is locked by another user. I have tested using isSetLocked() and isRowLocked() to confirm that only the
row is locked when a user edits.
Would I be getting this error because one of the linked databases has the same linked row that is also locked?
I am using the default session in my programming. Do I get around this problem by creating sessions?
I expected a lock error if someone is trying to edit the same row. I would expect that different users could edit different rows.
Any comments to solve this issue is appreciated.
Thanks,
Gary Smit
| |
| Jan Hoelterling 2006-02-28, 8:25 pm |
| look at "set reprocess" and "set lock" in the OLH
Jan
| |
| Todd Kreuter 2006-02-28, 8:25 pm |
| Gary Smit wrote:
>
> Would I be getting this error because one of the linked databases has the same linked row that is also locked?
Linking tables using masterRowet/Fields? Child rows will automatically
get locked when the parent row is being edited. Is this happening in
your case? If so, you may want to consider a manual link using setRange
in the parent onNavigate event (don't use masterRowset/fields in this
case).
> I am using the default session in my programming. Do I get around this problem by creating sessions?
Sessions are only useful to control locking for the the same user in the
same instance of dBASE.
--
Todd Kreuter [dBVIPS]
| |
| Gary Smit 2006-02-28, 8:25 pm |
| Todd Kreuter Wrote:
> Gary Smit wrote:
>
> Linking tables using masterRowet/Fields? Child rows will automatically
> get locked when the parent row is being edited. Is this happening in
> your case? If so, you may want to consider a manual link using setRange
> in the parent onNavigate event (don't use masterRowset/fields in this
> case).
Yes, all of my table are linked using masterRowset/Fields. It very much
sounds like I have a common child row that is being locked. Would I be expecting the setRange manual link to slow down the application?
Should I avoid using masterRowset/Fields linking when programming for network apps?
Gary Smit
| |
| Todd Kreuter 2006-02-28, 8:25 pm |
| Gary Smit wrote:
>
> Yes, all of my table are linked using masterRowset/Fields. It very much
> sounds like I have a common child row that is being locked. Would I be expecting the setRange manual link to slow down the application?
MasterRowset/Fields is applying setRange for you, so doing it yourself
should not make a difference speed wise. Now you won't be able to use
things like navigateMaster or navigateByMaster that are done internally
with tables linked using masterRowset/Fields.
> Should I avoid using masterRowset/Fields linking when programming for network apps?
I prefer to link tables manually but don't always do it. Less head
aches. Though on occasion I have a need to use the navigteMaster /
navigateByMaster.
--
Todd Kreuter [dBVIPS]
|
|
|
|