ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 5th, 2003, 09:54 AM
campbel8 campbel8 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 24 campbel8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old April 7th, 2003, 03:34 PM
defjamninja defjamninja is offline
Overly white
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83 defjamninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
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.

Reply With Quote
  #3  
Old April 8th, 2003, 08:34 PM
campbel8 campbel8 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 24 campbel8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 sec
Reputation Power: 0
Thanks

Thanks,

That seemed to fix it

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Unable to Update an Access Database

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap