How many RLock()s per file under S'87 
Author Message
 How many RLock()s per file under S'87

Hi All,

Is there a limit to the number of records that can be RLocked
simultaneously in the one dbf? Cannot find any literature that refers
to such a spec.

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia



Wed, 28 Sep 2005 22:42:41 GMT  
 How many RLock()s per file under S'87

Quote:

>Hi All,

>Is there a limit to the number of records that can be RLocked
>simultaneously in the one dbf? Cannot find any literature that refers
>to such a spec.

It depends on the size of the NOS locktable - this is configurable in
Netware and good old DOS SHARE.

Remember how locking works - it's the responsibility of the NOS to
keep track of all the region locks, not the application.



Thu, 29 Sep 2005 02:58:21 GMT  
 How many RLock()s per file under S'87


Quote:
> Hi All,

> Is there a limit to the number of records that can be RLocked
> simultaneously in the one dbf? Cannot find any literature that refers
> to such a spec.

i think that ng, indirectly, specify 1, because it said,
as i remember, that rlock lasts until unlock, flock() or
*some other record is locked*


Thu, 29 Sep 2005 05:22:21 GMT  
 How many RLock()s per file under S'87

Quote:

>Hi All,

>Is there a limit to the number of records that can be RLocked
>simultaneously in the one dbf? Cannot find any literature that refers
>to such a spec.

Searched thru the Clipper S'87 Norton Guide, but found nothing.
Probably the only way to find out for sure is to run a test program.

I found reference to locks (50 max) in my dBASE IV manual. Maybe it
might be used as an estimate.

Language Manual (dBASE IV v1.0)
page B-1 thru pg B-4

Multi-user Procedures
=====================

Locks -- Maximum number of locks: 50 (files and records)

Quote:

>Regards,

>Ross McKenzie
>ValuSoft
>Melbourne Australia



Thu, 29 Sep 2005 21:58:21 GMT  
 How many RLock()s per file under S'87
Hi Gabor,

On Sat, 12 Apr 2003 23:22:21 +0200, "gabor salai"

Quote:



>> Hi All,

>> Is there a limit to the number of records that can be RLocked
>> simultaneously in the one dbf? Cannot find any literature that refers
>> to such a spec.

>i think that ng, indirectly, specify 1, because it said,
>as i remember, that rlock lasts until unlock, flock() or
>*some other record is locked*

In Clipper 5.2x, you can apply multiple record locks with dbrlock()
function. Here is what the doc says (Drive's guide ng, C52g07b.ng):

-- 8< --
 DBRLOCK() function
 Lock the record at the current or specified identity
-------------------------------------------------------------------------------------------------
 Syntax

     DBRLOCK([<xIdentity>]) --> lSuccess

 Arguments

     <xIdentity> is a unique value guaranteed by the structure of the
     data file to reference a specific item in a data source
(database).  In
     a (.dbf) <xIdentity> is the record number.  In other data
formats,
     <xIdentity> is the unique primary key value.

 Returns

     DBRLOCK() returns lSuccess, a logical data type that is true
(.T.) if
     successful, false (.F.) if unsuccessful.

 Description

     DBRLOCK() is a database function that locks the record identified
by the
     value <xIdentity>.  In Xbase, <xIdentity> is the record number.

     If you do not specify <xIdentity>, all record locks are released
and the
     current record is locked.  If you specify <xIdentity>, DBRLOCK()
     attempts to lock it and, if successful, adds it to the locked
record
     list.

 Examples

     t  This example shows two different methods for locking multiple
        records:

        FUNCTION dbRLockRange( nLo, nHi )

           LOCAL nRec
           FOR nRec := nLo TO nHi
              IF ! DBRLOCK( nRec )
                 DBRUNLOCK()         // Failed - unlock everything
              ENDIF
           NEXT
           RETURN DBRLOCKLIST()      // Return array of actual locks

        FUNCTION dbRLockArray( aList )

           LOCAL nElement, nLen, lRet
           lRet := .T.
           nLen := LEN( aList )
           FOR nElement := 1 TO nLen
              IF ! DBRLOCK( aList[ nElement ] )
                 DBRUNLOCK()         // Failed - unlock everything
                 lRet := .F.
              ENDIF
           NEXT
           RETURN DBRLOCKLIST()

 Status:  New

 See also:  DBUNLOCK(), DBUNLOCKALL(), FLOCK(), RLOCK(), UNLOCK

-- 8< --

I don't know whether it is supported in v5 earlier versions.
--
Bambang P
http://bpranoto.tripod.com



Thu, 29 Sep 2005 22:59:09 GMT  
 How many RLock()s per file under S'87
you are right for v5, but according to subject ^^^^^ (see above)
question was for s87 ...


Quote:
> Hi Gabor,

> On Sat, 12 Apr 2003 23:22:21 +0200, "gabor salai"



> >> Hi All,

> >> Is there a limit to the number of records that can be RLocked
> >> simultaneously in the one dbf? Cannot find any literature that refers
> >> to such a spec.

> >i think that ng, indirectly, specify 1, because it said,
> >as i remember, that rlock lasts until unlock, flock() or
> >*some other record is locked*

> In Clipper 5.2x, you can apply multiple record locks with dbrlock()
> function. Here is what the doc says (Drive's guide ng, C52g07b.ng):

> -- 8< --
>  DBRLOCK() function
>  Lock the record at the current or specified identity
> --------------------------------------------------------------------------

-----------------------

- Show quoted text -

Quote:
>  Syntax

>      DBRLOCK([<xIdentity>]) --> lSuccess

>  Arguments

>      <xIdentity> is a unique value guaranteed by the structure of the
>      data file to reference a specific item in a data source
> (database).  In
>      a (.dbf) <xIdentity> is the record number.  In other data
> formats,
>      <xIdentity> is the unique primary key value.

>  Returns

>      DBRLOCK() returns lSuccess, a logical data type that is true
> (.T.) if
>      successful, false (.F.) if unsuccessful.

>  Description

>      DBRLOCK() is a database function that locks the record identified
> by the
>      value <xIdentity>.  In Xbase, <xIdentity> is the record number.

>      If you do not specify <xIdentity>, all record locks are released
> and the
>      current record is locked.  If you specify <xIdentity>, DBRLOCK()
>      attempts to lock it and, if successful, adds it to the locked
> record
>      list.

>  Examples

>      t  This example shows two different methods for locking multiple
>         records:

>         FUNCTION dbRLockRange( nLo, nHi )

>            LOCAL nRec
>            FOR nRec := nLo TO nHi
>               IF ! DBRLOCK( nRec )
>                  DBRUNLOCK()         // Failed - unlock everything
>               ENDIF
>            NEXT
>            RETURN DBRLOCKLIST()      // Return array of actual locks

>         FUNCTION dbRLockArray( aList )

>            LOCAL nElement, nLen, lRet
>            lRet := .T.
>            nLen := LEN( aList )
>            FOR nElement := 1 TO nLen
>               IF ! DBRLOCK( aList[ nElement ] )
>                  DBRUNLOCK()         // Failed - unlock everything
>                  lRet := .F.
>               ENDIF
>            NEXT
>            RETURN DBRLOCKLIST()

>  Status:  New

>  See also:  DBUNLOCK(), DBUNLOCKALL(), FLOCK(), RLOCK(), UNLOCK

> -- 8< --

> I don't know whether it is supported in v5 earlier versions.
> --
> Bambang P
> http://bpranoto.tripod.com



Fri, 30 Sep 2005 03:32:11 GMT  
 How many RLock()s per file under S'87
On Sun, 13 Apr 2003 21:32:11 +0200, "gabor salai"

Quote:



>> On Sat, 12 Apr 2003 23:22:21 +0200, "gabor salai"



>> >> Hi All,

>> >> Is there a limit to the number of records that can be RLocked
>> >> simultaneously in the one dbf? Cannot find any literature that refers
>> >> to such a spec.

>> >i think that ng, indirectly, specify 1, because it said,
>> >as i remember, that rlock lasts until unlock, flock() or
>> >*some other record is locked*

>> In Clipper 5.2x, you can apply multiple record locks with dbrlock()
>> function. Here is what the doc says (Drive's guide ng, C52g07b.ng):

>you are right for v5, but according to subject ^^^^^ (see above)
>question was for s87 ...

Yes, it's my fault overlooking the subject :).

However, as Ross asked it, it is likely Ross has found a way to place
multiple rlock() on 1 dbf in S'87 version. Ross, would you like to
share?

--
Bambang P
http://bpranoto.tripod.com



Fri, 30 Sep 2005 10:17:53 GMT  
 How many RLock()s per file under S'87
On Mon, 14 Apr 2003 09:17:53 +0700, Bambang P

Quote:

>>you are right for v5, but according to subject ^^^^^ (see above)
>>question was for s87 ...

>Yes, it's my fault overlooking the subject :).

>However, as Ross asked it, it is likely Ross has found a way to place
>multiple rlock() on 1 dbf in S'87 version. Ross, would you like to
>share?

Hi Bambang,

Well actually I was hoping that only one RLock could be applied. I am
working on a legacy application for a business in the US. They believe
that some of their workers are stealing from them by taking advantage
of a lack of locks. I have been able to confirm this weakness and
propose using a single lock as a means of preventing it, but it also
relies upon that lock being released when another is activated. So far
so good.

Thanks to all for their help.

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia



Fri, 30 Sep 2005 12:29:17 GMT  
 How many RLock()s per file under S'87

Quote:

> Is there a limit to the number of records that can be RLocked
> simultaneously in the one dbf?

IIRC, you can only lock one single record per application and workarea with
Clipper S'87

I may be wrong but only dbrlock() (which is a Clipper 5.x function and
does not exist in S'87) supports multiple records to be locked at the same
time.

HTH
Thomas Braun



Fri, 30 Sep 2005 19:25:23 GMT  
 How many RLock()s per file under S'87

Quote:

>> Is there a limit to the number of records that can be RLocked
>> simultaneously in the one dbf?

>IIRC, you can only lock one single record per application and workarea with
>Clipper S'87

>I may be wrong but only dbrlock() (which is a Clipper 5.x function and
>does not exist in S'87) supports multiple records to be locked at the same
>time.

I vaguely remember Netlib supports Clipper s87 multiple record locks.

Besides that,  provided the file handle of the work area can be
obtained, somebody can write multiple record lock function for s87.
--
Bambang P
http://bpranoto.tripod.com



Fri, 30 Sep 2005 21:30:53 GMT  
 How many RLock()s per file under S'87



Quote:

> > Is there a limit to the number of records that can be RLocked
> > simultaneously in the one dbf?

> IIRC, you can only lock one single record per application and workarea
with
> Clipper S'87

> I may be wrong but only dbrlock() (which is a Clipper 5.x function and
> does not exist in S'87) supports multiple records to be locked at the same
> time.

> HTH
> Thomas Braun

.. dbRLock() its included in v5.2 -> clipper.lib but... not described in any
(original )reference ( in 5.3 reference - exist).
... interesting - why?!
Griess


Fri, 30 Sep 2005 23:00:50 GMT  
 How many RLock()s per file under S'87

Quote:
> .. dbRLock() its included in v5.2 -> clipper.lib but... not described in
> any (original )reference ( in 5.3 reference - exist). ... interesting -
> why?!

DBRLOCK() is documented in the CA-Clipper 5.2 reference manual Norton Guide
(at least it is in the 5.2e version). It isn't in the main function list, it
is under Language>>Drivers. I'm pretty sure it and the other "new" RDD
functions were documented in the original 5.2 release.

--
Dave Pearson                        |  OSLib - Timeslice release functions.
http://www.davep.org/               |     eg - Norton Guide reader for Linux.
http://www.davep.org/clipper/       |    weg - Norton Guide reader for Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.



Sat, 01 Oct 2005 00:12:14 GMT  
 How many RLock()s per file under S'87

Quote:

> .. dbRLock() its included in v5.2 -> clipper.lib but... not described
> in any (original )reference ( in 5.3 reference - exist).
> ... interesting - why?!

Don't know... I never used 5.2 but started over from S'87 to 5.3

Thomas Braun



Sat, 01 Oct 2005 17:26:31 GMT  
 How many RLock()s per file under S'87
Ross,

Not sure but I think that S'87 doesn't permit more than an RLock at a time
(locking a record releases the previous lock). Am I right ?

--
Stephan St-Denis
AbeeLabs Systems Inc.

www.abeelabs.com



Quote:
> Hi All,

> Is there a limit to the number of records that can be RLocked
> simultaneously in the one dbf? Cannot find any literature that refers
> to such a spec.

> Regards,

> Ross McKenzie
> ValuSoft
> Melbourne Australia



Sun, 02 Oct 2005 23:54:22 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Linking S'87 Clipper files with C files

2. pach per summer 87 anno 2000

3. btrieve file open from clipper'87

4. Summer '87 Dbase IV Files

5. S'87 HTML with box at end of file

6. Error handling of COPY FILE (S'87)

7. Clipper S'87 NG file

8. Clipper '87 Linker delete files!?

9. how to overwrite files in '87

10. S'87 / W'98 / Netware 4

11. Summer '87 App doesn't remote print

12. Clipper '87 and printing under W'95

 

 
Powered by phpBB® Forum Software