Hi Anyone help?
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/anata/Send_OrderList.asp, line 102
My Code as below -
<%
-
-
CC_OrderAction=Request.ServerVariables("SCRIPT_NAME")
-
if Request("CC_OrderInsert") <> "" then
-
TimeKey=GetTimeInMillisec()
-
rsTimekey.AddNew (This is line102)
-
rsTimekey("Timekey")=TimeKey
-
For Each fld in rsTimekey.Fields
-
if Len(Request(fld.Name)) > 0 then
-
fld.Value = Request(fld.Name)
-
end if
-
Next
-
rsTimekey.Update
-
rsTimekey.Requery
-
rsTimekey.Filter= "Timekey='" & TimeKey & "'"
-
Session("OrderID")=Session("OrderID")
-
end if
9 6511
You need to use a locktype that supports updating in the ADO recordset.open method, the default is read only.
Example
Hope that helps.
Gaz
Hi Thank for your reply
sorry I m new for this asp
May i know where to put this code?
I try to rewrite the code to below
'
CC_OrderAction=Request.ServerVariables("SCRIPT_NAM E")
if Request("CC_OrderInsert") <> "" then
TimeKey=GetTimeInMillisec()
rsTimekey.open SQL,conn,1,2
rsTimekey.AddNew
rsTimekey("Timekey")=TimeKey
For Each fld in rsTimekey.Fields
if Len(Request(fld.Name)) > 0 then
fld.Value = Request(fld.Name)
end if
Next
rsTimekey.Update
rsTimekey.Requery
rsTimekey.Filter= "Timekey='" & TimeKey & "'"
Session("OrderID")=rsTimekey("OrderID")
end if
%>
but it turn up again message
Error Type:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.
/anata/Send_OrderList.asp, line 105
Hi
Somewhere in your code you should have a line that starts like this: -
rsTimekey.Open '... more code
-
Try adding this before it: -
rsTimekey.LockType = adLockPessimistic
-
Hope that helps
Gaz.
HI
after studying the locktype
i still could not figure out the place to insert
therefore,better to provide you all code
easy for you check
hoping you will help
the more common way to open a recordset is this: - dim rs, conn
-
set conn=server.createObject("adodb.connection")
-
conn.open connectionString
-
-
set rs = server.createObject("adodb.recordset")
-
rs.open command, conn, locktype, cursortype
Your method doesn't use this syntax, you declare the recordset by making a adodb.command, and then calling execute and dumping the result into the recordset variable. I don't think that method will work if you want to update your recordset. I suggest you rework the code to use the method I highlighted above, locktype and cursortype are both constants, 2 and 3 will work for you. Let me know if this helps.
Jared
BTW, I'm going to add code tags to make your post more readable. In the future please enclose your code in [ code]...[/code] tags
HI Thank
it work
thank for your helping
Microsoft OLE DB Provider for ODBC Drivers (0x80040E2F)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
/anata/Send_OrderList.asp, line 205 -
ODRecordset.AddNew
-
ODRecordset.Fields(UniqueIdColumn)=UniqueIdValue
-
ODRecordset.Fields("Quantity")=CCcart(CC_Quantity,i)
-
ODRecordset.Fields("Name")=CCcart(CC_Name,i)
-
ODRecordset.Fields("SalePrice")=CCcart(CC_Price,i)
-
rsOrderList.Update'(line 205)
I assume the UniqueIdColumn is an auto-incrementing key field. Don't set the auto-increment number! The recordset object will do that automatically when you call "update".
Jared
Please type the following after your code block:
[/code]
And type this right before your code block:
[code]
failure to do so could make me lose my temper
Hi My data is Access
so Now,I took away the prime key
it look like work
THK
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Zlatko Matić |
last post by:
There is a form (single form) and a combobox. I want that current record of
the form is adjusted according to selected value in the combobox. Cuurrent
record should be the same as the value in the...
|
by: kjvt |
last post by:
Based on a prior posting, I've written a function to convert a
recordset to a dataview. The first call to the function for a given
recordset works perfectly, but the second call always returns a...
|
by: barret bonden |
last post by:
(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....
|
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...
|
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...
|
by: melnhed |
last post by:
---Report the current filtered records from a Form---
Hello All,
I've seen this topic discussed before, but the solution described then
doesn't work in my particular case.
My Config: ...
|
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...
|
by: michal |
last post by:
hi guys,
i am using postgres 8.2 and try to add some records to a table with
ADODO ... unfortunately i end up with an error when calling the
addNew() method. it says that the recordset does not...
|
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.
...
|
by: ADezii |
last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be:
Can I add New Records to the...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
|
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...
| |