I need to change my project to a program that can be installed,please send me instructions on how to accomplish this,and I am having a problem copying my system to other pc's. It works fine on my pc,but when I copy to another pc,it only allows me to login and navigate,when I try to save,edit or delete,I get an error "operation must use an updateable query". I don't understand what it means by that,please help on both fronts? Very much appreciated!!

Dani AI

Generated

The behavior described by (works on the developer PC but not on other machines) is almost always a permissions/location issue rather than a SQL syntax bug. The Access engine must be able to create a lock file and write to the folder that holds the database; protected locations (root of C:, Program Files, etc.) and read-only file attributes block that and produce the familiar updateable-query error. Microsoft documents this pattern and what to check: .

Quick checklist and easy fixes

  • Verify the database file is not marked Read-only and that the Windows user (or the app process) has Modify rights on the folder (Properties -> Security).
  • Run the app as Administrator on the target machine: if writes work, it confirms a permission problem.
  • Move the DB out of protected folders. For shared data use the common AppData folder; for per-user data use LocalAppData. Update the connection string to build the path at runtime. Example VB.NET pattern:
Dim dataFolder As String = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MyApp")
Dim dbPath As String = System.IO.Path.Combine(dataFolder, "mydb.mdb")
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"

Installer notes (ties to )

  • A proper installer (ClickOnce, Visual Studio Installer/WiX, Inno Setup) should place the DB into a writable folder and set ACLs if the DB must be shared. ClickOnce installs per-user (avoids permission headaches); MSI/WiX can set folder permissions for shared data. If deeper debugging is needed, use Process Monitor to watch for ACCESS DENIED errors: Process Monitor.

Recommended Answers

All 3 Replies

You can create programs that can be installed by using setup creator in your visual studio.
About your other problem am still working on it, can you please try to elaborate more on it

You can create programs that can be installed by using setup creator in your visual studio.
About your other problem am still working on it, can you please try to elaborate more on it

OK m,I created an application that uses an access database to store and edit information.Since I want this application to work everywhere,I put the database in the C drive so that the connection string ends up as "C:/database_name". This connection string works just fine,considering I can login to the system,and the datagridviews I used show the data in the tables. The problem is when I try to do anything at all to one of these tables; save,delete or edit. I get that error I wrote above; "must use an updateable query".I have used an sql save query(insert into table) for this and I have tried changing by updating the dataset,it does not budge. It only happens once I change computers,so I really do not get what the error is,nothing gets highlighted either,I could have at least worked from that.

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.