If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > update problem..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-03, 05:49
sqlboy sqlboy is offline
Registered User
 
Join Date: Mar 2003
Location: Memphis, TN, USA
Posts: 61
Post update problem..

Hi there !!
I am try to update one record in the database.. but on doing so i am getting this error..

ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

/login/modifyprofile.asp, line 14

Can any one let me know what is the error and why it come ? I am using ASP and SQL Server 2000

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-28-03, 21:37
tdavisjr tdavisjr is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
Re: update problem..

Try somethign like this

set conn = server.createobject(ADODB.Connection)

strUpdate = "Update [tablename] SET [field] = [value] WHERE [field] = [value]"

set rs = conn.execute(strUpdate)


Now provided that the strUpdate string is formed properly this whould go ahead and update the database







Quote:
Originally posted by sqlboy
Hi there !!
I am try to update one record in the database.. but on doing so i am getting this error..

ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

/login/modifyprofile.asp, line 14

Can any one let me know what is the error and why it come ? I am using ASP and SQL Server 2000

Thanks in advance
Reply With Quote
  #3 (permalink)  
Old 12-29-03, 01:12
sqlboy sqlboy is offline
Registered User
 
Join Date: Mar 2003
Location: Memphis, TN, USA
Posts: 61
Thanks for the suggestions !!

But it is not the way i want.. i have one asp page which allow user to modify any of the fileds value after login.. I first scan the user details and shows up in one form and want user to update the profile...

This is what i am doing..

Dim conn,rs,bolfound
set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.open ............
rs.open "clp,conn, , ,adCmdtable
bolfound = false
Do while NOT (rs.EOF OR bolfound)
if( Strcomp(rs("screenname"), Session("screenname"),vbtextcompare)= 0) then
bolfound = true
else
rs.movenext
End if
loop
%>
and then records listing are displaying like..
-----------
--------
and at end..
rs.update

hope this time.. i am much more clearer then earlier..
Reply With Quote
  #4 (permalink)  
Old 12-29-03, 14:52
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Smile cursor type

I think that the problem is the cursor type you are using. You may use the default cursor which is adOpenForwardOnly. This cursor only allows you to navigate forward in the recordset and does not allow updates to the recordset. My suggestion is that you need to change the cursor type to adOpenKeySet (=1) or adOpenDynamic (=2) with the lock type of adLockPessimistic (=2) or adLockOptimistic (=3). Note that there is a price to pay for using adOpenDynamic since the database must provide all changes to the data to your cursor while it is open.

Does that give you help?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

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