Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Access VBA Timing Problem

Access VBA Timing Problem

Scheduled Pinned Locked Moved Visual Basic
helpquestionsharepointdatabase
16 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Ingo

    We got a customer who uses a Access DBs with code inside - one DB with Forms and Modules, the second stores the data. Two users work together from their computers on those DBs stored in the network. Well, the devloper they had went into retirement. So I had the pleasure to port the Access 97/2000 DBs to 2003/2010. No there are some funny errors appearing just in their network not in our. I went to them cause I wasn't able to replicate those errors. Now it's even stranger. I tried to debug them, but they didn't appeared. I stopped debugging and the errors were thrown - not all the time but most times. Access messages that a record is locked by another user although I was the only one today working on the db. There are error-messages, that an update wasn't successful but the data is stored correctly, after leaving the form all data is correct when I open it again. It seems, that there is a timing / synchronisation error. I think the programm-code is faster than the operations in the data-db. But as debugging isn't possible it's hard to find the source. Is there a way for a better synchronisation? One user has Windows XP, the other one Windows 7 both use Access 2003 SP 3. Regards, Ingo

    ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

    M Offline
    M Offline
    Maciej Los
    wrote on last edited by
    #6

    It's not "timing problem". It's Access database synchronization problem. Client stores copy of data as long as synchronization will be possible. Please, refer these: Page-level locking vs. record-level locking[^] about sharing an access database on a network[^] set options for a shared access database[^] help access run faster[^]

    I 1 Reply Last reply
    0
    • M Maciej Los

      It's not "timing problem". It's Access database synchronization problem. Client stores copy of data as long as synchronization will be possible. Please, refer these: Page-level locking vs. record-level locking[^] about sharing an access database on a network[^] set options for a shared access database[^] help access run faster[^]

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #7

      Thanks for your answer. To my sorrow these settings are all properly done. I checked them already.

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      1 Reply Last reply
      0
      • I Ingo

        Dave Kreskowiak wrote:

        Your first problem is your using Access.

        I'm not using Access. They use it and so I have to. So my problem is that they use Access.

        Dave Kreskowiak wrote:

        And, so far, this has nothing to do with Visual Basic at all.

        Well I thought there was the chance to give more time per operation programmatically, as while I'm debugging - no error occurs. Thank you for your answer, Ingo

        ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #8

        ihoecken wrote:

        I'm not using Access. They use it and so I have to. So my problem is that they use Access.

        Again, without the error messages, it's pretty impossible to tell you what's going on. But, with all the problems you're having, this is why you don't see very many multi-user Access applications.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        I 1 Reply Last reply
        0
        • I Ingo

          GuyThiebaut wrote:

          If you have more than one process updating the same record at the same time you will get a record locking issue in Access.

          That's clear

          GuyThiebaut wrote:

          how do you know that no other process was accessing the record

          Easy. The other users weren't there today. There was only one user on which pc I worked, there was no ldb-file before I started, the ldb-file was deleted everytime I closed.

          GuyThiebaut wrote:

          There really is no way around this unless you find some way to take a copy of the record for each user but then you may encounter a merge issue when you then go and update the original record overwriting the previous users data.

          The different users work on different subjects which have own datarecords. The same records won't be opened by different users at the same time due to the workflow they use.

          ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

          G Offline
          G Offline
          GuyThiebaut
          wrote on last edited by
          #9

          Thanks - I think the only way I would be able to help was if I was sitting next to you when this happens. What I would say is to keep a note of the the tables this happens on - this will be the clue. Also check to see if there are any triggers on tables being updated which may be causing an issue to.

          “That which can be asserted without evidence, can be dismissed without evidence.”

          ― Christopher Hitchens

          I 1 Reply Last reply
          0
          • D Dave Kreskowiak

            ihoecken wrote:

            I'm not using Access. They use it and so I have to. So my problem is that they use Access.

            Again, without the error messages, it's pretty impossible to tell you what's going on. But, with all the problems you're having, this is why you don't see very many multi-user Access applications.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            I Offline
            I Offline
            Ingo
            wrote on last edited by
            #10

            There are no error messages that state the problem. There are different messages "error 3020 on tblXY Update or CancelUpdate without Addnew or edit" There is always an addnew or edit and there is the error-message but the data is stored properly. The error isn't thrown when I go step-by-step through the code with debugging. The error isn't thrown here at my work in our network. There are other errors, too. (record is locked by other user, but there was no other user today, when the error was thrown). All errors disappear while debugging and sometime during the normal work, too.

            ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

            D 1 Reply Last reply
            0
            • G GuyThiebaut

              Thanks - I think the only way I would be able to help was if I was sitting next to you when this happens. What I would say is to keep a note of the the tables this happens on - this will be the clue. Also check to see if there are any triggers on tables being updated which may be causing an issue to.

              “That which can be asserted without evidence, can be dismissed without evidence.”

              ― Christopher Hitchens

              I Offline
              I Offline
              Ingo
              wrote on last edited by
              #11

              GuyThiebaut wrote:

              Thanks - I think the only way I would be able to help was if I was sitting next to you when this happens.

              Well thank you for your answer. It's totally strange. I never saw such a problem although in former times I had to build some access solutions.

              GuyThiebaut wrote:

              Also check to see if there are any triggers on tables being updated which may be causing an issue to.

              Are triggers available before Access 2010? Well I didn't looked at them cause I thought they weren't , I will do it tomorrow. Thank you.

              ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

              D 1 Reply Last reply
              0
              • I Ingo

                GuyThiebaut wrote:

                Thanks - I think the only way I would be able to help was if I was sitting next to you when this happens.

                Well thank you for your answer. It's totally strange. I never saw such a problem although in former times I had to build some access solutions.

                GuyThiebaut wrote:

                Also check to see if there are any triggers on tables being updated which may be causing an issue to.

                Are triggers available before Access 2010? Well I didn't looked at them cause I thought they weren't , I will do it tomorrow. Thank you.

                ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #12

                ihoecken wrote:

                Are triggers available before Access 2010

                No, Access (I should say Jet or ACE) doesn't support Triggers.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak

                1 Reply Last reply
                0
                • I Ingo

                  There are no error messages that state the problem. There are different messages "error 3020 on tblXY Update or CancelUpdate without Addnew or edit" There is always an addnew or edit and there is the error-message but the data is stored properly. The error isn't thrown when I go step-by-step through the code with debugging. The error isn't thrown here at my work in our network. There are other errors, too. (record is locked by other user, but there was no other user today, when the error was thrown). All errors disappear while debugging and sometime during the normal work, too.

                  ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #13

                  I would start by reading up as much as you can after you Google for "Access error 3020". I have no idea if any of the situations or solutions applies to your situation, but it's a start.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  I 1 Reply Last reply
                  0
                  • I Ingo

                    We got a customer who uses a Access DBs with code inside - one DB with Forms and Modules, the second stores the data. Two users work together from their computers on those DBs stored in the network. Well, the devloper they had went into retirement. So I had the pleasure to port the Access 97/2000 DBs to 2003/2010. No there are some funny errors appearing just in their network not in our. I went to them cause I wasn't able to replicate those errors. Now it's even stranger. I tried to debug them, but they didn't appeared. I stopped debugging and the errors were thrown - not all the time but most times. Access messages that a record is locked by another user although I was the only one today working on the db. There are error-messages, that an update wasn't successful but the data is stored correctly, after leaving the form all data is correct when I open it again. It seems, that there is a timing / synchronisation error. I think the programm-code is faster than the operations in the data-db. But as debugging isn't possible it's hard to find the source. Is there a way for a better synchronisation? One user has Windows XP, the other one Windows 7 both use Access 2003 SP 3. Regards, Ingo

                    ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                    B Offline
                    B Offline
                    Bernhard Hiller
                    wrote on last edited by
                    #14

                    There is one more source of problems in customer installations: they use some kind of virus scanner. And such a virus scanner might block the access database file for a moment when data are changed (because the file contents are changed). When you debug step by step, the virus scanner can finish its job before the next request is done, but in production code the time span is too small. I'd suggest to remove the database file from the virus scanners's tasks.

                    I 1 Reply Last reply
                    0
                    • B Bernhard Hiller

                      There is one more source of problems in customer installations: they use some kind of virus scanner. And such a virus scanner might block the access database file for a moment when data are changed (because the file contents are changed). When you debug step by step, the virus scanner can finish its job before the next request is done, but in production code the time span is too small. I'd suggest to remove the database file from the virus scanners's tasks.

                      I Offline
                      I Offline
                      Ingo
                      wrote on last edited by
                      #15

                      Good idea, thanks. I will talk with them about that. :-\

                      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                      1 Reply Last reply
                      0
                      • D Dave Kreskowiak

                        I would start by reading up as much as you can after you Google for "Access error 3020". I have no idea if any of the situations or solutions applies to your situation, but it's a start.

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak

                        I Offline
                        I Offline
                        Ingo
                        wrote on last edited by
                        #16

                        Well, I do. It's just hard to test any possible solution as the errors don't occur in our environment. Thank you for your time.

                        ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups