Solved

asp UPDATE Query to MS Access DB

Posted on 2012-04-01
2
282 Views
Last Modified: 2012-04-05
I have an asp page that generates an error when attempting to update a table in an Access database.  If I copy and paste the SQL query directly into Access it works just fine.  Error generated on the "adoCmd.Execute"  command is:

 "-2147467259 [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. "


Dim adoCon, rsDatabase, strSQL                           

strSQL = "UPDATE 201204 SET AM='R', PM='R' WHERE D1='01';"

Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("charter.mdb")
Set rsdatabase = Server.CreateObject("ADODB.Recordset")
Set adoCmd = Server.CreateObject("ADODB.Command")
adoCmd.ActiveConnection = adoCon
adoCmd.CommandText = strSQL
adoCmd.Execute
0
Comment
Question by:MERCOMMS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
plummet earned 150 total points
ID: 37793676
Hi

Check out this MS support article: http://support.microsoft.com/kb/175168

It may well be one of the issues listed in there. I hope so!
0
 

Author Closing Comment

by:MERCOMMS
ID: 37812209
It was a permissions issue.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Make the most of your online learning experience.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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…
Six Sigma Control Plans
Suggested Courses
Course of the Month4 days, 7 hours left to enroll

635 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