473,769 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Current Recordset does not support updating.

(closest newsgroup I could find)
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.
/asp_data3_add.a sp, line 30

<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsAddComments 'Holds the recordset for the new record to be added
Dim strSQL 'Holds the SQL query to query the database
'1Create an ADO connection object
Set adoCon = Server.CreateOb ject("ADODB.Con nection")
'2Set an active connection to the Connection object using a DSN-less
connection
adoCon.Open "DRIVER={Micros oft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath( "t.mdb")

'3Create an ADO recordset object
Set rsAddComments = Server.CreateOb ject("ADODB.Rec ordset")

'4Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT last, first FROM main;"

'5 Set the cursor type we are using so we can navigate through the
recordset
rsAddComments.C ursorType = 2

'Set the lock type so that the record is locked by ADO when it is updated
'rsAddComments. LockType = 3
'Open the recordset with the SQL query
rsAddComments.O pen strSQL, adoCon

'Tell the recordset we are adding a new record to it
rsAddComments.A ddNew

'Add a new record to the recordset
rsAddComments.F ields("last") = Request.Form("l ast")
rsAddComments.F ields("first") = Request.Form("f irst")
'Write the updated recordset to the database
rsAddComments.U pdate

'Reset server objects
rsAddComments.C lose
Set rsAddComments = Nothing
Set adoCon = Nothing

'Redirect to the guestbook.asp page
'Response.Redir ect "asp_data2. asp"
%>

Dec 12 '05 #1
2 3046
The good newsgroup for a question about databases and ASP would be
microsoft.publi c.inetserver.as p.db

Second, using the old ODBC driver is probably not the best idea; you should
use the OLEDB provider instead.

Third, you must make sure that in your Select statement, the primary key for
the table has been selected (and that your table has a primary key defined,
of course).

Fourth, using constant such as « CursorType = 2 » without writing a notice
about its definition is not the best thing to do. Personally, I don't
remember at all the definition of 2 and of 3 in this context.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"barret bonden" <ar****@network s-cc.com> wrote in message
news:9M******** *********@fe08. lga...
(closest newsgroup I could find)
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of
the
provider, or of the selected locktype.
/asp_data3_add.a sp, line 30

<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsAddComments 'Holds the recordset for the new record to be added
Dim strSQL 'Holds the SQL query to query the database
'1Create an ADO connection object
Set adoCon = Server.CreateOb ject("ADODB.Con nection")
'2Set an active connection to the Connection object using a DSN-less
connection
adoCon.Open "DRIVER={Micros oft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath( "t.mdb")

'3Create an ADO recordset object
Set rsAddComments = Server.CreateOb ject("ADODB.Rec ordset")

'4Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT last, first FROM main;"

'5 Set the cursor type we are using so we can navigate through the
recordset
rsAddComments.C ursorType = 2

'Set the lock type so that the record is locked by ADO when it is
updated
'rsAddComments. LockType = 3
'Open the recordset with the SQL query
rsAddComments.O pen strSQL, adoCon

'Tell the recordset we are adding a new record to it
rsAddComments.A ddNew

'Add a new record to the recordset
rsAddComments.F ields("last") = Request.Form("l ast")
rsAddComments.F ields("first") = Request.Form("f irst")
'Write the updated recordset to the database
rsAddComments.U pdate

'Reset server objects
rsAddComments.C lose
Set rsAddComments = Nothing
Set adoCon = Nothing

'Redirect to the guestbook.asp page
'Response.Redir ect "asp_data2. asp"
%>

Dec 13 '05 #2
You are in the wrong newgroup this is ASP.NET
Please post to ASP newgroup

"barret bonden" <ar****@network s-cc.com> wrote in message
news:9M******** *********@fe08. lga...
(closest newsgroup I could find)
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/asp_data3_add.a sp, line 30

<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsAddComments 'Holds the recordset for the new record to be added
Dim strSQL 'Holds the SQL query to query the database
'1Create an ADO connection object
Set adoCon = Server.CreateOb ject("ADODB.Con nection")
'2Set an active connection to the Connection object using a DSN-less
connection
adoCon.Open "DRIVER={Micros oft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath( "t.mdb")

'3Create an ADO recordset object
Set rsAddComments = Server.CreateOb ject("ADODB.Rec ordset")

'4Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT last, first FROM main;"

'5 Set the cursor type we are using so we can navigate through the
recordset
rsAddComments.C ursorType = 2

'Set the lock type so that the record is locked by ADO when it is updated 'rsAddComments. LockType = 3
'Open the recordset with the SQL query
rsAddComments.O pen strSQL, adoCon

'Tell the recordset we are adding a new record to it
rsAddComments.A ddNew

'Add a new record to the recordset
rsAddComments.F ields("last") = Request.Form("l ast")
rsAddComments.F ields("first") = Request.Form("f irst")
'Write the updated recordset to the database
rsAddComments.U pdate

'Reset server objects
rsAddComments.C lose
Set rsAddComments = Nothing
Set adoCon = Nothing

'Redirect to the guestbook.asp page
'Response.Redir ect "asp_data2. asp"
%>

Dec 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
16550
by: (Pete Cresswell) | last post by:
I posted this in the MS Access group, but no luck. ------------------------------------------ I've got another stored procedure in the same app that returns multiple recordsets and the code works. But now I've written another SP and the code traps out with the 3251 message. The SP is writing two recordsets. When I run the SP in Query Analyzer, both recordsets appear.
5
3750
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional information: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. It occurs when I attempt to add a new record. I've stripped out much of the code, leaving the pertinent (I hope) info. ...
9
24317
by: Johnfli | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. I am moving my webserver from NT4 using SQL to win2003 using SQL 2003 I get the above error when my asp page does teh line: Rs.absolutepage = intCurrentPage I tested teh value of intCurrent page and teh value is 1.
8
7506
by: jamesnkk | last post by:
I got this Run-time error 3251 Current Recrdset does not support updating. This may be limation of the provider, or of the selected locktype. Dim red1 As New ADODB.Recordset Dim strmess As String Set cnp = CurrentProject.Connection strmess = "SELECT * from tblinvoicelines WHERE invoice=" & newInvo
3
6106
by: mark_aok | last post by:
Hi all, All I am trying to do is open a table, edit it, and then close it. But I am having the strangest error. Here is my code Dim i as integer Dim rs as adodb.recordset Set rs = new ADODB.recordset rs.open "SELECT * FROM ITEM",CurrentProject.Connection, adOpenStatic, adLockOptimistic
9
16239
by: BlackMustard | last post by:
Hi, I get the following error on the last line: Run-time error '3251': Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. ' Open database connection Set adoConn = CreateObject("ADODB.Connection")
3
4790
by: aleseus | last post by:
New to the forum, so thanks for having me. I'm submitting a form, and attempting to save it to a local copy of an ACCESS 2007 database. When I am submitting the form, I get the following error: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /JustBorn/form_submit.asp, line 414 Line 414 is: rs.Open...
1
1746
by: chrisawilliams | last post by:
I am trying to compare a record (active) field. If the field is no then send the user to a not active page and if it is yes, send the user to the main page. This is what I have so far: <!--#include file="inc/requestcookies.asp"--> <!--#include file="inc/common.inc"--> <% strSQL = "SELECT * FROM memberslist WHERE username = '" & username & "'" Set rst = conn.Execute(strSQL) Dim myaccount Rst("active") = myaccount
2
3493
by: rashmi wadhwa | last post by:
<% dim conn,rs set conn=Server.createobject("ADODB.Connection") set rs=Server.createobject("ADODB.RecordSet") conn.Open "Provider=SQLOLEDB;Persist Security Info=False;User Id=sa;Initial Catalog=movie;Initial File Name=C:\Inetpub\wwwroot\b\movie.mdf"
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9850
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8862
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.