Link to home
Start Free TrialLog in
Avatar of soodsandeep
soodsandeepFlag for India

asked on

Problem in Update Statement

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
Avatar of soodsandeep
soodsandeep
Flag of India image

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of James Murrell
James Murrell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.