Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Location
    Memphis, TN, USA
    Posts
    61

    Post Unanswered: 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

  2. #2
    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







    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

  3. #3
    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..

  4. #4
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •