Solved

vb6-ms access returns "OPERATION MUST USE AN UPDATEABLE QUERY" errror

Posted on 2008-06-24
8
790 Views
Last Modified: 2013-12-25
Dim ConStr As String
Set Con = New ADODB.Connection
ConStr = "Provider=Microsoft.jet.OLEDB.4.0; " + " Data source=\\dbsrv\HR\db\db1.mdb;"

Set RsEmp = New ADODB.Recordset

 RsEmp.LockType = adLockOptimistic
 RsEmp.CursorLocation = adUseClient
 RsEmp.CursorType = adOpenKeyset
 RsEmp.Open "select * from tb1", Con

the database is stored in  a shared directory HR from the computer DBSRV! the update query only works when run locally, but produces an error message "operation must use an updateable  query" if run from anyother computer in workgroup.
both administrators and  users groups were assigned  full control access to the HR directory however i am still getting  the same error message! so can anybody help fix it?

thanks


0
Comment
Question by:winklez
  • 4
  • 4
8 Comments
 
LVL 23

Expert Comment

by:irudyk
ID: 21857722
Try adding
Con.Mode = 3      '3 = adModeReadWrite
after
Set Con = New ADODB.Connection

e.g.
Dim ConStr As String
Set Con = New ADODB.Connection
Con.Mode = 3      '3 = adModeReadWrite
0
 

Author Comment

by:winklez
ID: 21863217
setting the Con.Mode to 3  could not fix it!
0
 
LVL 23

Expert Comment

by:irudyk
ID: 21864598
You mentioned "both administrators and  users groups were assigned full control access to the HR directory".  Just curious, does the 'db' folder inherits its permissions from the parent (or 'HR') folder?  If it does, then try giving full rights to the computer object itself (i.e. the computer name that is having the issue) to see if that does anything.
0
 

Author Comment

by:winklez
ID: 21874601
yeah it does, the DB inherits permissions from HR!  so how do i give the full rights to the computer objects? is it similar to assign rights to users? i.e through  HR directory properties security tab, add users,? i am working in work-group environment, how do u locate the computer object?  thanks
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 23

Expert Comment

by:irudyk
ID: 21875696
When you click the Add button the dialog box that pops up should have an Object Types.... button.  When you click on that button another dialog box appears where you should be able to check offf Computers.  From there you should be able to enter/search for the computer name.
0
 

Author Comment

by:winklez
ID: 21882007
did try but the same error message persists!
0
 
LVL 23

Accepted Solution

by:
irudyk earned 70 total points
ID: 21882640
Hmmm...have you tried to open the mdb file from this other computer (i.e. using Access) to see if it can be opened directly?  If you can do that then it is not likely a network security rights issue.  If you can open the file, can you get intot the tb1 table and make changes to the data.  If you can't then it would appear that it is a user level security issue on the table within the mdb file.
0
 

Author Comment

by:winklez
ID: 22008277
never give up, actually, as stated above by irudyk, it was a network security issue.
1> share permissions were set set to change
2> from the host, the user guest was enabled,  added the security tab of HR folder and guaranteed the 'write" permission

 irudyk, thank u very much
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now