?
Solved

Problem in Update Statement

Posted on 2009-12-31
3
Medium Priority
?
220 Views
Last Modified: 2012-05-08
Hello experts, i am trying to update a record in my Access 2003 database through ASP.
it is giving error.
my asp page (vb script) and error message shown by server are given below,
please help, whats the problem.
Thanks.

<%
      <!-- #INCLUDE FILE="adovbs.inc" -->
      dim SQL
      set Con = Server.CreateObject("ADODB.Connection")
      
      Con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source='C:\Documents and Settings\Administrator\Desktop\ASP Work\Database\Studs.mdb'"
      
        Con.Open
      
      sql="Update Student SET Class ='abc' where rollno = 101"
      
      response.write sql
      Con.execute sql       'This is Problem (line no 13)

      'response.write(" Ok")
      response.expires = -1
%>



Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/aspwork/updaterecord2.asp, line 13
0
Comment
Question by:soodsandeep
3 Comments
 

Author Comment

by:soodsandeep
ID: 26153000
table name is Student,
it has many filelds like Rollno, name, class, sex etc.
i mean, i have written filed names correct in Update statement.
Thanks.
0
 
LVL 31

Accepted Solution

by:
James Murrell earned 100 total points
ID: 26153206
take a read of http://support.yessoftware.com/kb_article.asp?article_id=4 it has helped me out with this sort of problem many times
0
 
LVL 9

Expert Comment

by:tanujchandna
ID: 26157809
Hi,

Give everyone read, write and modify permission to this database and the issue gets resolved for you.

If using asp.net pages the provide network services read, write and modify permission to web directory to resolve this issue.

Thanks.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

864 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