|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Unable to Update an Access Database
Hello,
I am trying to update an Access database through an ASP page. After researching the internet, the general consensus is that permissions are not correctly being set on the .mdb file that I am trying to update. I am using WinXP Pro. I have went into Start->Control Panel->Administrative Tools->Computer Management and went into the IIS drop down and went into my websites directory. I selected the .mdb file through the interface and selected the properties option and set the file permissions to read and write. I did the same to the directory that the .mdb file is located. Just as a test, I gave the .asp page read and write permissions (I know that this is not a good practice, I was just doing it as a test). When I run the asp page, I get the following error: Microsoft JET Database Engine (0x80004005) Operation must use an updateable query Here is the code that generates the message: title = Request.QueryString("txtTitle") website = Request.QueryString("txtWebsite") comments = Request.QueryString("txtComment") ' Construct the database connection set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Provider = "Microsoft.Jet.OLEDB.4.0" dbConnection.Open Server.MapPath("..") & "/db/website.mdb" ' Insert album information sql = "INSERT INTO Albums (title, website, comments) VALUES ('" & title & "', '" & website & "', '" & comments & "')" dbConnection.Execute sql dbConnection.Close set dbConnection = Nothing Thank-you for any help you can provide. |
|
#2
|
|||
|
|||
|
Well your on the right track it sounds like. Make sure that you have given permissions for read & write to the user IUSER_<computer name> account. What you may also need to do is give that user read and write to the entire directory in which the database is stored. If you have already done this then you may want to double check and make sure you stop and restart the service. That should do it.
|
|
#3
|
|||
|
|||
|
Thanks
Thanks,
That seemed to fix it |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Unable to Update an Access Database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|