Results 1 to 2 of 2

Thread: I know.. another Multi User Access prob..

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Not much help from me.

    I do not know enough to answer this question, but nobody else seems interested, so here are some thoughts.

    The problem you are talking about has to be mediated at the machine language level by the Operating System.

    If it is not being done automatically by Access or the OS, then you have to do research and find an API call or use some special syntax to Lock a record (or the file) and/or query for the existence of a lock before attempting to edit the record.

    On most systems I have worked on, there was a Query-and-lock conditional which either gave you access (and locked the object) or else indicated that the record/file was in use.




    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Hamilton, New Zealand
    Posts
    137
    I'm not an expert on ADO there is extensive documentation at msdn.microsoft.com/library however.


    I think if you use
    Code:
    Dim rstTemp As New ADODB.Recordset
    rstTemp.Open "Table Name", cnnDb, adOpenKeyset, adLockPessimistic, adCmdTable
    The DB engine will raise an error when the second user tries to run the update method. I'm not exactly sure of this as I have a feeling that it depends on the DB engine. Ie Jet (Access) does it one way and SQL Server does it another way.

    I know it's a common problem so see if you can find anything on Microsofts Site.





    [Edited by mattbrown on 12-05-2000 at 03:04 PM]
    Regards

    Matt Brown
    Hamilton, NZ
    VB6 C++ in Visual Studio 6sp4
    VB.net Beta 1

Posting Permissions

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



Click Here to Expand Forum to Full Width