ASP / IIS Recordset not updatable

  • Thread starter Martin van Vliet
  • Start date
M

Martin van Vliet

Hello,

When I try to run the following code I get an error: "Recordset not
updatable". It is possible to show data from the same table on a webpage, so
the database name and the table nam must be correct. I 've tried several
other things, also leaving out the
adOpenDynamic, adlockOptimistic.
If I run this code as VBA in an Access database, it works without problems.

<%
const DB_NAME = "C:\ASP\eOrganizer.mdb"

Call Main

sub Main
dim cndb
dim rs

set cnDB = Server.createobject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")

cnDB.Connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
DB_NAME
cnDB.Open

rs.Open "tblNotes", cnDB , adOpenDynamic, adlockOptimistic
rs("notName") = "Meeting 1-2-2004"
rs.update


end sub

%>
 
B

Bob Barrows

Martin said:
Hello,

When I try to run the following code I get an error: "Recordset not
updatable". It is possible to show data from the same table on a
webpage, so the database name and the table nam must be correct. I
've tried several other things, also leaving out the
adOpenDynamic, adlockOptimistic.
If I run this code as VBA in an Access database, it works without
problems.

<%
const DB_NAME = "C:\ASP\eOrganizer.mdb"

Call Main

sub Main
dim cndb
dim rs

set cnDB = Server.createobject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")

cnDB.Connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & DB_NAME
cnDB.Open

rs.Open "tblNotes", cnDB , adOpenDynamic, adlockOptimistic
rs("notName") = "Meeting 1-2-2004"
rs.update


end sub

%>

http://www.aspfaq.com/show.asp?id=2062 - updatable cursor
http://www.aspfaq.com/show.asp?id=2009 - 80004005 errors

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top