Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DAO - File Sharing Lock Count (Visual Studio 6)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO - File Sharing Lock Count (Visual Studio 6)

    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.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO - File Sharing Lock Count (Visual Studio 6)

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •