Current location: Hot Scripts Forums » Programming Languages » ASP » Current Recordset does not support updating error while submitting form.


Current Recordset does not support updating error while submitting form.

Reply
  #1 (permalink)  
Old 03-01-10, 12:40 AM
Aleseus Aleseus is offline
New Member
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Current Recordset does not support updating error while submitting form.

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 "customer",myconn,adOpenStatic,adLockOptimisti c

been pouring over this for a while now, and finally breaking down and asking. The DB and form_submit.asp are in the same directory on an IIS server, held locally, but will be posted eventually. Any and all help would be appreciated.

Anthony
Beginner Programmer

Code:
<% 
        
DIM repID, cusName, cusPhone, cusAddress, cusCity, cusState, cusZip, product, upccode, mfgcode, bestByDate, purchased, store, notes, contacted, spokewith

repID = request.form("repID") 
cusPhone = request.form("cusPhone") 
cusAddress = request.form("cusAddress") 
cusCity = request.form("cusCity") 
cusState = request.form("cusState") 
cusZip = request.form("cusZip") 
product = request.form("product") 
upccode = request.form("upccode") 
mfgcode = request.form("mfgcode") 
bestByDate = request.form("bestByDate") 
purchased = request.form("purchased") 
store = request.form("store") 
notes = request.form("notes") 
contacted = request.form("contacted") 
spokewith = request.form("spokewith") 

DIM myconn, RS, curDate, dbPath, dbName
curDate = Date
dbName = "JustBorn.accdb"
dbPath = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath(dbName) & ";Persist Security Info=False;"


Set myconn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
myconn.Open = dbPath

        rs.Open "customer",myconn,adOpenStatic,adLockOptimistic

        rs.AddNew

        rs("CurDate") = curDate
        rs("RepID") = repID
        rs("CusName") = cusName
        rs("CusPhone") = cusPhone
        rs("CusAddress") = cusAddress
        rs("CusCity") = cusCity
        rs("CusState") = cusState
        rs("CusZip") = cusZip
        rs("Product") = product
        rs("UPCCode") = upccode
        rs("MFGCode") = mfgcode
        rs("BestByDate") = bestByDate
        rs("Purchased") = purchased
        rs("Store") = store
        rs("Notes") = notes
        rs("Contacted") = contacted
        rs("spokewith") = spokewith

        rs.Update

'grab the ID value
DIM ID
ID = RS(0)
        
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Just Born</title>
</head>

<body>

<p align="center">
<table align="center" cellpadding="5" border="3" bordercolordark="#707070" bordercolorlight="#E0E3DC">
	<tr>
		<td align="center" valign="middle">
			SAVE CONFIRMED
		</td>
	<tr>
		<td align="center" valign="middle" bgcolor="#E6EFF7">
			<p style="font-family:sans-serif;">
			Record <%=ID%> Saved<br>
			<input type="Button" value="CONTINUE" onClick="window.location='<%=ReturnTo%>'">
			</p>
		</td>
	</tr>
</table>

<!--#include file="footer.asp"-->
</p>

</body>
</html>

<%
'cleanup
rs.Close
set rs=nothing
myconn.close
set myconn=nothing
%>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Space Above Form xavier039 CSS 1 07-13-09 11:52 PM
ajax checking and onsubmit issue follower JavaScript 4 10-12-08 04:45 PM
I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA bilicek.com PHP 3 01-31-08 05:54 PM
Updating current money spent in a form with checkboxes. . . Spreegem JavaScript 4 07-13-05 10:10 PM


All times are GMT -5. The time now is 11:08 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.