• DAO – File Sharing Lock Count (Visual Studio 6)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » DAO – File Sharing Lock Count (Visual Studio 6)

    • This topic has 2 replies, 2 voices, and was last updated 23 years ago.
    Author
    Topic
    #370874

    OK – I know DAO is ‘Defunct’ but I’m working with an older app that was developed using this technology.

    I’m reading a lot of records from an AS/400 system and writing them back to a database back end (MS Access – what were they thinking of?!). To control the records being written, the entire procedure is wrapped up in a DAO Transaction. The problem with transactions is that if you try and manipulate more records than 70000ish, you will encounter error 3052, ‘File Sharing Lock Count Exceeded’.

    An easy way (but extremely bad practice, defeating the point of the transaction) to deal with the error is to commit the transaction, begin a new transaction and continue running the procedure from where the error occurred.

    Obviously, I don’t want to go down this route. Does anyone know how to get round the problem without losing data integrity??

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #587945

      3052 usually means you’ve used a synchronize method, which doesn’t make sense inside a transaction. Are you dealing with a Novell network server? The problem is that there are filelock settings on both the local machine and the server and Novell has a limit on filelocks. NT Servers normally allow as many locks as the available resources will handle, but you may have to set the MaxLocksPerFile registry key in Jet 4.0 to a higher number. If you’re using a Novell server, this is contraindicated. Take a look at MSKB Q198633 and see if anything there helps.

      • #587954

        Charlotte,

        Yes, we’re using a Novell server – currently in the process of converting everything over to NT. Thanks for an excellent answer though, the article is very helpful.

        Cheers
        Dylan

    Viewing 0 reply threads
    Reply To: DAO – File Sharing Lock Count (Visual Studio 6)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: