Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I am using vb.net, vs2010,office 7 and window 7.

I have created a windowapplication in vs2010 version.application is running succesfully in my pc. but setup is not running in my pc.

when i add new record then occured this type of error.

"System.Data.OldDB.OleDbException : Operation must use an updateable query."

how can solve this type of error. help will be appreciated.

thank
mukesh
Posted

If yoiu get an error message you don't know what to do about, try googling the whole error.
I did, and it led me here, which may well be relevant: http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/73590300-9f46-4d1a-9ff3-4d1259dd7427[^]

Without better info as to what code is generating the error, it is a good guess that permissions are the problem. If not, try the google search: http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=System.Data.OldDB.OleDbException+%3A+Operation+must+use+an+updateable+query[^]
 
Share this answer
 
XML
Run the application as "Run as Administrator". Right click on your application then click "Run as Administrator". Now, your application will work properly.
Or
Change UAC settings in your project. Right click on your project in the solution explorer, then choose properties. Click "View UAC settings" in Application Tab.
Modify the following

<security>
      <applicationRequestMinimum>
        <defaultAssemblyRequest permissionSetReference="Custom" />
        <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site">
          <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
        </PermissionSet>
      </applicationRequestMinimum>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!--UAC Manifest Options
            If you want to change the Windows User Account Control level replace the
            requestedExecutionLevel node with one of the following.
        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
            If you want to utilize File and Registry Virtualization for backward
            compatibility then delete the requestedExecutionLevel node.-->
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>


Save and rebuild your application. Now, It will work fine
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900