Solved

asp UPDATE Query to MS Access DB

Posted on 2012-04-01
2
274 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
2 Comments
 
LVL 10

Accepted Solution

by:
plummet earned 150 total points
Comment Utility
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
Comment Utility
It was a permissions issue.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

772 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

10 Experts available now in Live!

Get 1:1 Help Now