Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. problem updating from a datagrid

problem updating from a datagrid

Scheduled Pinned Locked Moved Visual Basic
helpdatabasequestionannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcm
    wrote on last edited by
    #1

    Dim RS As AdodB.Recordset Set RS = New AdodB.Recordset Dim intCurrentRecord As Integer Dim iOrderNo As String Dim strProductCode As String Dim strDesc As String Dim iQuantity As Integer Dim iPrice As Integer iOrderNo = txtOrderNo.Text strProductCode = Adodc3.RS("ProductCode") strDesc = Adodc3.RS("ProductDesc") iQuantity = Adodc3.RS("Quantity") iPrice = Adodc3.RS("Price") With intCurrentRecord Dim editSQL As String editSQL = "update OrderDetail set ProductCode = '" & strProductCode & "', ProductDesc = '" & strDesc & "', Quantity = " & iQuantity & ", Price = " & iPrice & "" Set RS = Conn.Execute(editSQL) End With the (intended) purpose of the above code is that when the user pressed the edit button, having changed the details of the current record in the datagrid, that the SQL statement would execute the update. however, i am not referring to this current record properly, it is not recognising it, throwing an error of "method or data member not found", what can i do to fix this? thank you!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups