Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updateable query error question

Status
Not open for further replies.

guyphil

Programmer
Nov 2, 2004
27
IL
Hi,

I have an application that is up and running on the web. It has no problems updating the (access)database.

I'm creating a website with the same functionality for a different client and so I basically cut and pasted the code for the second app just changing the graphics.

When trying to update the database I get:

Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.

My database on the server sits in the folder with the needed permissions.

The thing is, when I ran it locally, I got the same error. Then when I went to the first app and ran it locally I got that error to!

Does this make sense?

How can this be?

GuyPhil

 
have you double checked the permissions on the DB folder? remember that IUSR account needs read and write access to the folder.


Tony
_______________________________________________________________
 
How do I go about granting read/write access to the IUSR account?

Guyphil
 
Assuming you have access to the webserver:

1) Right click on the folder in Windows Explorer
2) Select 'Properties' from the context menu
3) Select the 'Security' tab from the window that appears
4) If the IUSR_<machinename> account isnt listed then click on the 'Add' button and browse the list for the account
5) Tick the 'Modify' checkbox for the IUSR account
6) Click on 'OK'

Note: This is for Windows 2000

Tony
_______________________________________________________________
 
Oh, I thought you meant my local machine.

Do you know why I get this error when I run it locally?

Thank you for taking the time to help.

Guyphil.
 
It's just I can't be sure if it's a problem with my hosting untill it runs on my machine error free.

Guyphil.
 
Well your machine is a webserver if you run it locally too :)

Try the above permissions check on the relevant folder on your machine and see what happens

Tony
_______________________________________________________________
 
I'm running XPPro.

Even though this wasn't in windows explorer,

I did find it (I think) in the IIS snap in.

I click on 'properties' of the relevant folder -> Directory Security ->Edit The I have ticked "Anonymous access - No username/password required to access this resource.
Account used for anonymous access:
User Name: IUSR_MY_COMPUTER_NAME
Password: ********** "

I am assuming this is it.

If so, we are barking up the wrong tree.

On the remote server the first app is working fine, yet locally it's not writing.

Anything else you can think of?
 
No thats not what I was referring to. You still need to apply the relevant security settings to allow the IUSR account to read and write to the folder that contains the .mdb file. You need to do this through Windows Explorer, not IIS.

I'm afraid I do not use XP but the idea should be similar to what I put above.

Tony
_______________________________________________________________
 
The permissions must be OK in both the IIS SnapIn and also in the underlying file system... so you have to check it in Windows Explorer.

The IUSR_MachineName account is the one that needs permission, even when you are running it locally.... the reason is that even though YOUR account has permission, IIS uses the IUSR_ account to get the files as long as you have anonymous access checkbox active.

I hope that made sense.
 
Also if you are using MS Access it is a good plan to set the permission on the folder so that it will always trickle down to its files. The reason for this is that if you ever use the "Compact and Rebuild Database" option inside MS Access the file is actually destroyed and recreated so it will have only the default permissions again... this can make you crazy!
 
I think I found it this time:

In Windows Explorer

Right-click on the folder>Properties

click 'Web Sharing tab'>

click 'share this folder' radio button>

click under 'Access permissions' 'Read, Write, Script sources access' check boxes

I don't know if this is it or not but unfortunately im still getting the err.

Any Ideas?
Guyphil
 
No that is not it. You need to click the "Security "tab, not "Web Sharing" ... that is something different.
 
I don't have a security tab. Only General, Sharing, Web Sharing and Customise.
 
Well I'm also running XP Pro and I can see it... The only thing is that I am using the 'classic' desktop but i wouldn't imagine that would matter. Let me go around the office and find a 'normal' XP box and see if it looks different.

Also, are you looking at the properties of the .mdb file or of its folder?
 
I was looking at the folder but the mdb file doesn't have a security tab either.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top