0

Hi guys,
I just got into a little problem.I just deployed an application with backend db access.It works fine on major OSs being used like win7 and XP.
But some functionality related to the database doesn't work properly when deployed on win8. I used a code to delete temp table if it exists.This feature completely works on the other OSs.But i don't know why the code is not working on the later OS.
Any thought to solve the problem?

Public Sub DroptempProject()
        On Error GoTo ErrorHandler
        Dim str As String
        str = "DROP TABLE ptempTable"
        ExecSQL(str)
        'Exit Sub
ErrorHandler:
        If Err.Number = 7874 Then
            Resume Next
        End If
    End Sub
5
Contributors
5
Replies
33
Views
4 Years
Discussion Span
Last Post by edwarsd142
0

You should be using TRY/CATCH rather than On Error. Also, because you haven't included the code for ExecSQL or the text of any error message there is no way to offer meaningful suggestions.

0

There could be some security restriction if you install the access database in c:\program file\your_folder or c:\program file (x86)\your_folder . If you do, try to to give full access to the folder where your data reside by right click on the folder and press properties >> security tab.

0

Try changing Execution level in windows settings to

 <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

from

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />

Edited by Riteman

0

@samir ibrahim,
Thank you for the idea,it worked.BTW do you have any idea how to hide the database file physically when installed on a client machine?

0

In order to fix this troublesome error “can’t update databse or object is read only” you must try this manual fix.
Steps To Follow:
Link the entire lookup column in the underlying list to tables. For this, just follow down theses steps:

  • Like to SharePoint list itself. Make sure that all lookup tables for the underlying list are present within Access.
    *Delete the linked table for the SharePoint list in Access.
  • Link the SharePoint view through the ImportSharePointList macro action.

For further manual fixes you can visit:
www.accessrepairnrecovery.com/blog/fix-odbc-microsoft-access-driver-cannot-update-database-object-is-read-only-error

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.