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

Recommended Answers

All 4 Replies

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.

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.

Try changing Execution level in windows settings to

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

from

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

@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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.