surotkin,
  As far as I know, the code below is only for the session you are in. I
have a few programs where I have to increase the max locks for them to run
effectively. You are better off doing this in code otherwise you have to
convince your IT group to set all machines using your database to this in
the individual registry's which can be a pain. I have not noticed any
problems with locked records when I do this. When the code ends, the
records are unlocked because your SQL statements or recordsets are done and
empty.

Good Luck
Hal

Hal McGee
Engineering Data Manager
Group Engineering - Process and Compliance
Seating Products Group
B/E Aerospace
Winston-Salem, NC


                                                                           
             "surotkin"                                                    
             <[EMAIL PROTECTED]                                             
             om>                                                        To 
             Sent by:                  [email protected]    
             AccessDevelopers@                                          cc 
             yahoogroups.com                                               
                                                                   Subject 
                                       [AccessDevelopers] How to solve     
             01/19/2006 05:29          MaxLocksPerFile problem without     
             PM                        changing registry settings?         
                                                                           
                                                                           
             Please respond to                                             
             AccessDevelopers@                                             
              yahoogroups.com                                              
                                                                           
                                                                           




Hi all!

My code is causing a violation against the MaxLocksPerFile in the
registry.
I checked Microsoft Knowledge Base
http://support.microsoft.com/default.aspx?scid=kb;EN-US;815281.
It suggests increasing MaxLocksPerFile setting in registry by using :

DAO.DBEngine.SetOption dbmaxlocksperfile, 1500

or manually.

So far I discovered already that the problem is caused by the
following code:

dim dbs as database
dim rst as recordset
set dbs = currentdb
set rst = dbs.openrecordset ("A NORMAL SELECT-QUERY")

do until rst.EOF
rst.edit
.....
rst.UPDATE
rst.MoveNext
loop

rst.close
dbs.close

I don't mind to use SetOption method.
However, I don't understand what does the above mentioned code locks.
In other words, what code should I use in order not to lock anything?

=> apparently the records remain locked after the edit-statement. I
didn't have this problem when using Access 97. It seems that
Access2002 has much more features for client-server structures but
I'll have to learn how to use them. Therefore I would like to know as
what type and what options I have to give to my recordset in order to
achieve that each record is un-locked directly after the rst.UPDATE
statement. In the help-files I didn't find an answer that solved my
problem...

Any help appreciated.
Thanks.
surotkin







Please zip all files prior to uploading to Files section.



                                                            SPONSORED LINKS
                                                                  
 Microsoft access    Microsoft access help  Microsoft access      
 developer                                  database              
                                                                  
 Microsoft access    Microsoft access       Microsoft access      
 training            training course        programming           
                                                                  


                            YAHOO! GROUPS LINKS

       Visit your group "AccessDevelopers" on the web.

       To unsubscribe from this group, send an email to:
       [EMAIL PROTECTED]

       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.







Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to