S T I L L locked out.... 
Author Message
 S T I L L locked out....

Hi, VB - developers.

I answered many qoustions in these Groups, so would someone P L E A S E
anwere the 1 question I ask????????
(Of cource if you know the solution :-) )

VB 4.0 16 Bit (Prof.)  &  Access database (Jet 2.5)

On a recordset (type table) I have set the LockEdits = False, but
still the table is locked for thoer Users for Edit or AddNew.
Very bad: I only read(!!!) the table and its closed(!!!) again, but still
other users
cant edit this table!

Code:
====

Private Sub MySub(....)
Dim RS as Recorsdet
  Set RS=MyDB.OpenRecordset("MyTable",dbOpenTable)
  RS.LockEdits = False
   RS.Index
  ..
  for n = 0 to veryoften  
     ....
     RS.Seek "=",Number,"blabla"
     x=RS!MyField                           'Only reading!!!!
     ....
  next n
  ..
  RS.CLOSE                                  'ByeBye!!!
End Sub

Other users cant Edit the the Table till the Form is closed,
where the sub is in, or records "far away" from the locked
location are read.

This error doesnt occur, when using type dbOpenDynaset, but I
need "hight speed" search.

Details:
======
The table has an con. Index of an long and a text - Field.
The table has about 25000 records. 1 record is about 150 byte
The above Sub is called called very often, but the table is locked even when it
is
not read at the moment. 1x reading locks the table "forever".
This happens when the db is located on Novell 4.12 OR Windows XXYY.
(i.e. on all platforms I have)

Who knows that problem???

Michael Patron



Fri, 01 Sep 2000 03:00:00 GMT  
 S T I L L locked out....

After you close, try adding
    dbEngine.idle dbFreeLocks

This is from the online help:
The Idle method allows the Microsoft Jet database engine to perform
background tasks that may not be up-to-date because of intense data
processing. This is often true in multiuser, multitasking environments that
don't have enough background processing time to keep all records in a
Recordset current.

Usually, read locks are removed and data in local dynaset-type Recordset
objects are updated only when no other actions (including mouse movements)
occur. If you periodically use the Idle method, Microsoft Jet can catch up
on background processing tasks by releasing unneeded read locks.

Specifying the optional dbRefreshCache argument forces any pending writes to
.mdb files, and refreshes memory with the most current data from the .mdb
file.

You don't need to use this method in single-user environments unless
multiple instances of an application are running. The Idle method may
increase performance in a multiuser environment because it forces the
database engine to write data to disk, releasing locks on memory.

Note   You can also release read locks by making operations part of a
transaction.

Quote:

>Hi, VB - developers.

>I answered many qoustions in these Groups, so would someone P L E A S E
>anwere the 1 question I ask????????
>(Of cource if you know the solution :-) )

>VB 4.0 16 Bit (Prof.)  &  Access database (Jet 2.5)

>On a recordset (type table) I have set the LockEdits = False, but
>still the table is locked for thoer Users for Edit or AddNew.
>Very bad: I only read(!!!) the table and its closed(!!!) again, but still
>other users
>cant edit this table!

>Code:
>====

>Private Sub MySub(....)
>Dim RS as Recorsdet
>  Set RS=MyDB.OpenRecordset("MyTable",dbOpenTable)
>  RS.LockEdits = False
>   RS.Index
>  ..
>  for n = 0 to veryoften
>     ....
>     RS.Seek "=",Number,"blabla"
>     x=RS!MyField                           'Only reading!!!!
>     ....
>  next n
>  ..
>  RS.CLOSE                                  'ByeBye!!!
>End Sub

>Other users cant Edit the the Table till the Form is closed,
>where the sub is in, or records "far away" from the locked
>location are read.

>This error doesnt occur, when using type dbOpenDynaset, but I
>need "hight speed" search.

>Details:
>======
>The table has an con. Index of an long and a text - Field.
>The table has about 25000 records. 1 record is about 150 byte
>The above Sub is called called very often, but the table is locked even
when it
>is
>not read at the moment. 1x reading locks the table "forever".
>This happens when the db is located on Novell 4.12 OR Windows XXYY.
>(i.e. on all platforms I have)

>Who knows that problem???

>Michael Patron



Fri, 01 Sep 2000 03:00:00 GMT  
 S T I L L locked out....

Have you tried this?

  Set RS=MyDB.OpenRecordset("MyTable",dbOpenTable,dbReadOnly)
  RS.Index

Quote:

> Hi, VB - developers.

> I answered many qoustions in these Groups, so would someone P L E A S E
> anwere the 1 question I ask????????
> (Of cource if you know the solution :-) )

> VB 4.0 16 Bit (Prof.)  &  Access database (Jet 2.5)

> On a recordset (type table) I have set the LockEdits = False, but
> still the table is locked for thoer Users for Edit or AddNew.
> Very bad: I only read(!!!) the table and its closed(!!!) again, but still
> other users
> cant edit this table!

> Code:
> ====

> Private Sub MySub(....)
> Dim RS as Recorsdet
>   Set RS=MyDB.OpenRecordset("MyTable",dbOpenTable)
>   RS.LockEdits = False
>    RS.Index
>   ..
>   for n = 0 to veryoften
>      ....
>      RS.Seek "=",Number,"blabla"
>      x=RS!MyField                           'Only reading!!!!
>      ....
>   next n
>   ..
>   RS.CLOSE                                  'ByeBye!!!
> End Sub

> Other users cant Edit the the Table till the Form is closed,
> where the sub is in, or records "far away" from the locked
> location are read.

> This error doesnt occur, when using type dbOpenDynaset, but I
> need "hight speed" search.

> Details:
> ======
> The table has an con. Index of an long and a text - Field.
> The table has about 25000 records. 1 record is about 150 byte
> The above Sub is called called very often, but the table is locked even when it
> is
> not read at the moment. 1x reading locks the table "forever".
> This happens when the db is located on Novell 4.12 OR Windows XXYY.
> (i.e. on all platforms I have)

> Who knows that problem???

> Michael Patron

--
Cludio Avolio Rodrigues
Systems Especialist
IBM GS

Home page: http://www.geocities.com/SunsetStrip/4994

Please remove NOSPAN from username to reply.



Fri, 01 Sep 2000 03:00:00 GMT  
 S T I L L locked out....

Hi!!!

Back:

Quote:
> dbEngine.idle dbFreeLocks

No, this one doent work. It just kills my performance.

Quote:
><< ,dbReadOnly >>

Sounds so E A S Y, Im going to check that one!!!!

Michael Patron
Michael Patron




Sat, 02 Sep 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. A97/comctl32.ocx/OLE_XPOS_PIXELS

2. System.Runtime.Remoting.Channels.Tcp ???

3. System.Runtime.Remoting.Channels.TCP

4. Only for experts: LS 120

5. Inet Execute and ls and size commands

6. BitBlt and Image Contros ls

7. Using Scripting.Shell Exec command to capture the results of a SFTP ls command

8. FTP ls and dir not working

9. INET CRASH EXECUTE LS WITH EMPTY

10. Internet transfer control: ls is slow

11. FTP ls _vs_ FTP from Browser

12. Printing Forms (in need of LS Paper 32bit)

 

 
Powered by phpBB® Forum Software