Microsoft Visual Basic: Editing a recorset (Ado)

  • pamtru / 104 / Fri, 19 Feb 2010 21:36:00 GMT / Comments (3)
  • i have the following code(before i make de ado connetion, and the ado recordset have the property adopendynamic,adlockoptimistic)
    id is numeric type in the database

    dim trs as recordset
    dim nbuscar as variant

    nbuscar = zzzzz.text
    nbuscar = Replace(nbuscar, "*", "%")
    nbuscar = Replace(nbuscar, "?", "_")
    frmCartasCaminantes.txtCarta = nbuscar
    nbuscar = "Select * from base where id =" + nbuscar
    Set trs = cnn.Execute(nbuscar)
    * trs.Fields(12) = "cccccc"
    * trs.Update
    trs.MoveLast

    * Here is where i have the problem, it said to me that i cant update, that it is blocked or something like that, how can i edit recorset in ado?
  • Keywords:

    recorset, ado, microsoft, visual basic, vb

  • http://www.edevs.com/visual-basic/70664/«« Last Thread - Next Thread »»
    1. strExecute = "UPDATE [base] SET [FieldName u want to update] = '" & "cccccc" & "' WHERE id = " & nbuscar
      cnn.Execute strExecute

      Hope this will help...

      wrack | Mon, 03 Dec 2007 21:53:30 GMT |

    2. Thanks for the reply i will try it.

      pamtru | Mon, 03 Dec 2007 21:54:30 GMT |

    3. Thank you rack it work ok!!!! :D

      pamtru | Mon, 03 Dec 2007 21:55:29 GMT |

  • Microsoft Visual Basic Questions

    • progress

      hi guys,where can i download the progress database and can anyone give me the links for the referenc...

      By ravi15481

    • Stitching .PDF Files??

      Hello,I am interested in learning how to author a .PDF document using Visual Basic 6. To be more sp...

      By ahmonra

    • Virus Scan

      [Originally posted by Manish Vij]I want to Virus-scan a file from VB/ASP code. I'm facing probl...

      By anonymous

    • Still waving OCX problems

      Hello,I still have problems with my dependencies. Can anybody send me the dep files from msrdo20, co...

      By vreeswijk

    • Progress bar

      Hi All,I use the code below to display the progress of when the program is searching, but for some r...

      By loftty, 3 Comments

    • Thesis

      hi!i'm a college student currently doing a thesis that involves the tracking of the activities ...

      By seifer, 1 Comments

    • Grouping two projects ?

      HII have two projects in Group.vbg ... Project1 andn Project2, each project has different forms ... ...

      By vb6_lover, 3 Comments

    • STL file

      Dear Lists,Anyone know how VB can read STL file format or ASCII format. Please let me know, I need ...

      By wan, 1 Comments

    • Sting manipulation

      I have a string which some " . " characters, I have to replace the "." in very 3,6,9, 12....the posi...

      By manzoor, 9 Comments