Solved

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

Posted on 2008-06-24
8
789 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

705 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

18 Experts available now in Live!

Get 1:1 Help Now