Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP / IIS Recordset not updatable

Reply
Thread Tools

ASP / IIS Recordset not updatable

 
 
Martin van Vliet
Guest
Posts: n/a
 
      02-05-2004
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

%>

--
Martin van Vliet, Amsterdam
tel. 020 625 62 08



 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      02-05-2004
Martin van Vliet wrote:
> 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
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Values from an Updatable data grid =?Utf-8?B?S2lyYW4gS3VtYXIgUGluamFsYQ==?= ASP .Net 2 11-01-2005 09:26 PM
Use of updatable query questions =?Utf-8?B?Smlt?= ASP .Net 3 10-04-2005 02:53 AM
newbie - updatable query in asp Krechting ASP General 8 12-13-2004 06:01 AM
Operation must use an updatable query - user problem Mr. x ASP .Net 1 11-06-2003 02:52 PM
RecordSet.Move or RecordSet.AbsolutePosition?? Hung Huynh ASP General 8 09-24-2003 11:07 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57