Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MaxFilesShared registry problem

Status
Not open for further replies.

dirkg

Technical User
May 20, 2000
170
BE
Hi all!

I have this strange problem with an Access-application. When I made it in Access 2000 on my computer it worked without any problem. My PC has Windows2000 Proffessional as operating system.
When I transfered it to a PC which works in a Windows NT-environment, there came up a problem which had something to do with sharing of the files. The text said I had to change something about a MaxFilesShared registry or something like that. I don't know what the exact description is because I can not reproduce this error on my PC. At first I thought it had something to do with a database-object that I opened but forgot to close but that is not the case. Moreover I increased the amount of calculations on my PC about 100 times compared to the amount of calculations on the other PC and still I don't get the error. Has somebody got a clue for this one? I'm sorry that my description is not more precise....

Thanks a lot in advance.


Greetings,


Dirk

dirk.news@yucom.be
 
I hope this helps. I am not in an NT operations system (boy, do I sure miss it). In 95 and 98 there is a Regestry entry (MaxLocksPerFile ) that I had to increase in order to syncronize a very out of date database. The default setting is 9500 and I had to increase to 20000. I there is a posting at Microsoft that instructs to take this action.
What I do not know is if the Regestry field I referred to is the same as yours (MaxFilesShared ). I would suggest going to the Microsoft Knowledge Base and do a search on (MaxFilesShared )and see what you get. Hope this helps.
 
Yes, this was indeed the problem I had, it was the MaxLocksPerFile I had to increase and not the entry MaxFilesShared as I mentionned. I looked for the entry in the Windows 2000 entry but I can't find it.
However, I'm wondering what statements in code can cause that this registry entry is violated because I have no access to the registry in the NT-environment wher I'm working. Can it be caused by openrecordset-statements or by lines such as "set dbs = currentdb"?
 
I have read the article in the Microsoft Knowledge base and there they describe as if the problem would only occur during synchronization. However I do not use the Synchronize method at all in my code. I do use however a the FileCopy method to copy the database wich contains all the data from the network to my local drive before I start running my code. But I do not think that the cause lies in that because the error occurs some procedures after I have done the FileCopy. But from what I read in the article, would it also be possible that this error is caused by a large update-query, or by the recordset.edit and recordset.update statement?

 
I'm one step further:

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
=> apparentlty the records remain locked after the edit-statement. I didn't have this problem when using Access 95. It seems that Access 2000 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 the record is un-locked directly after the rst.UPDATE statement. In the help-files I didn't find an answer that solved my problem...:-(

Thanks again.


Best regards,


Dirk


dirk.news@yucom.be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top