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. could not update, currently locked

could not update, currently locked

Scheduled Pinned Locked Moved Visual Basic
databasequestionannouncement
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

    With Adodc3.Recordset .MoveFirst Do While Not .EOF cPrice = DataGrid1.Columns("Price") strProductCode = DataGrid1.Columns("ProductCode") 'updating the price table Dim updateSQL As String updateSQL = "Update Price set Price = " & cPrice & " " & _ " where PriceCode = '" & strPriceCode & "' " & _ " AND ProductCode = '" & strProductCode & "'" Set RS = Conn.Execute(updateSQL) .MoveNext Loop End With the above is code i use to update a datagrid, the only column that is not locked in the datagrid is the price column and the only other piece of code that i think may affect it is a BeforeColUpdate function checking to see only numeric values are entered...is there anything i am doing wrong? it updates the prices fine in the database, is there any way i could catch it to degrade gracefully instead of crashing out? Thanks in advance!

    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