problems adding/ updating on client pc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tan
    New Member
    • Oct 2006
    • 10

    #1

    problems adding/ updating on client pc

    Hi, I have tested my databse and everthing works fine but then have given it to a customer and the following part of the code does not seems to be updating as required.

    Set rs = db.OpenRecordse t("LTOT_second_ oxygen2", dbOpenDynaset)
    rs.FindFirst "[HospitalNumber] = '" & Me![general_info.Ho spitalNumber] & "'"
    If rs.NoMatch Then
    rs.AddNew
    rs![HospitalNumber] = Me![general_info.Ho spitalNumber]
    rs.Update
    End If

    Any ideas why this could be-I am stumped!!!?????

    Could this have anything to do with access permissions set by an IT department? At the moment i havent set any form of workgroups, permissions etc as its only a beta trial database with one client.
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by tan
    Hi, I have tested my databse and everthing works fine but then have given it to a customer and the following part of the code does not seems to be updating as required.

    Set rs = db.OpenRecordse t("LTOT_second_ oxygen2", dbOpenDynaset)
    rs.FindFirst "[HospitalNumber] = '" & Me![general_info.Ho spitalNumber] & "'"
    If rs.NoMatch Then
    rs.AddNew
    rs![HospitalNumber] = Me![general_info.Ho spitalNumber]
    rs.Update
    End If

    Any ideas why this could be-I am stumped!!!?????

    Could this have anything to do with access permissions set by an IT department? At the moment i havent set any form of workgroups, permissions etc as its only a beta trial database with one client.
    More likely has to do with missing vb library references. Go to vb editor, select Tools>Reference s.....Any show as "Missing"?

    Comment

    • tan
      New Member
      • Oct 2006
      • 10

      #3
      no all the references are there.i have tested it on 5 pc's (including one totally clean) and it works fine in both a full and runtime version-its just this client.im not sure if its something to do with opening a recordset in code? permissions with this?

      Comment

      • puppydogbuddy
        Recognized Expert Top Contributor
        • May 2007
        • 1923

        #4
        Originally posted by tan
        no all the references are there.i have tested it on 5 pc's (including one totally clean) and it works fine in both a full and runtime version-its just this client.im not sure if its something to do with opening a recordset in code? permissions with this?
        You need to provide more info ......your version of Access, your operating environment (Windows XP, etc.). Is your application split, etc.

        1. In your recordset code, you did not post your declarations. Did you declare (dim) the recordset as a DAO/ADO Recordset? Are vb library references set for DAO, ADO?

        2. Does client machine have same version of Access?

        3. Are any ActiveX controls being used in the application that have to be registered with Windows Regsvr32.

        4. Has MDW workgroup security file been properly set up?

        Comment

        • tan
          New Member
          • Oct 2006
          • 10

          #5
          i am using access 2000 on xp operating system-this is also what the client has.i have also tested on a vista op and that was fine.

          yes i have included:

          Dim db As DAO.Database
          Dim rs As DAO.Recordset

          I do not use any activex controls, but i have not set any workgoup security files (could this be where my problem is?)

          Comment

          • puppydogbuddy
            Recognized Expert Top Contributor
            • May 2007
            • 1923

            #6
            Originally posted by tan
            i am using access 2000 on xp operating system-this is also what the client has.i have also tested on a vista op and that was fine.

            yes i have included:

            Dim db As DAO.Database
            Dim rs As DAO.Recordset

            I do not use any activex controls, but i have not set any workgoup security files (could this be where my problem is?)
            The system MDW was probably set up for you during the install. You should be able to verify that the System.MDW file exists (refer to article in link). The update failure you originally alluded to seems more like it could be related to not granting the proper permissions to the shared folder where the mdb/mde file has been placed.

            Using MyComputer on the Windows Desktop, Right-click on the shared folder where you have the mdb/mde installed and select Sharing And Security. The Properties dialog box for the folder should display four tabs: General, Sharing, Web Sharing, and Customize. Select the Sharing tab, and it should be divided into two sections: Local Sharing, and Network Sharing And Security. Make sure the Network Sharing is set for the shared folder, and that local sharing is turned off.

            2. Log on as an administrative user, right-click the shared folder in question, choose Properties, click Security, click the Advanced button, and click the Effective Permissions tab. Select a user or group to view the effective permissions for that user or group on the specific file or folder. Are they correct?

            See this link for an excellent reference for security .

            Comment

            • tan
              New Member
              • Oct 2006
              • 10

              #7
              how come they can update information through the data entry form then and note through code? i could not find the effective user permissions from the advanced tab

              Comment

              • puppydogbuddy
                Recognized Expert Top Contributor
                • May 2007
                • 1923

                #8
                Originally posted by tan
                how come they can update information through the data entry form then and note through code? i could not find the effective user permissions from the advanced tab

                Good question. On one hand.....since no (application) user level security has been set up, everyone has full access to the database....on the other hand, if full permissions have not been granted to users of the shared folder (via Windows security), only a windows system administrator would have add/update/delete privileges to shared folder...and just because you can enter info on the forms doesn't mean the underlying tables were updated.

                Comment

                • tan
                  New Member
                  • Oct 2006
                  • 10

                  #9
                  thats the bdd thing though, any data entered via the data entry form is added to the tables, just not the data that should be updated via the code

                  Comment

                  • tan
                    New Member
                    • Oct 2006
                    • 10

                    #10
                    hey, thanks to everyone for all their help! the problem is sorted.the database had been saved to all users/application data, so that when the database was opened by a limited user updates and additions via open recordset were not allowed. i solved this by simply moving the folder to the C:/ drive - phew

                    Comment

                    • puppydogbuddy
                      Recognized Expert Top Contributor
                      • May 2007
                      • 1923

                      #11
                      Originally posted by tan
                      hey, thanks to everyone for all their help! the problem is sorted.the database had been saved to all users/application data, so that when the database was opened by a limited user updates and additions via open recordset were not allowed. i solved this by simply moving the folder to the C:/ drive - phew
                      Phew is right...LOL!! Glad you got it resolved.

                      Comment

                      Working...