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. data grid update

data grid update

Scheduled Pinned Locked Moved Visual Basic
cssdatabasehelpannouncement
3 Posts 2 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.
  • A Offline
    A Offline
    asha_s
    wrote on last edited by
    #1

    hi i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1) Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1) DataAdapter1.Update(DataSet1, "Section") the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.)

    C 1 Reply Last reply
    0
    • A asha_s

      hi i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1) Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1) DataAdapter1.Update(DataSet1, "Section") the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.)

      C Offline
      C Offline
      C1AllenS
      wrote on last edited by
      #2

      Hello, This error comes up when the Select statement does not return any Primary key column. The SelectCommand must return at least one primary key or unique column. If none are present, an InvalidOperation exception is generated, and the commands are not generated. For more details on this, you may refer to the given MSDN Link: http://msdn.microsoft.com/en-us/library/tf579hcz.aspx[^] I hope this helps. Regards, Allen

      Allen Smith Software Engineer ComponentOne LLC www.componentone.com

      A 1 Reply Last reply
      0
      • C C1AllenS

        Hello, This error comes up when the Select statement does not return any Primary key column. The SelectCommand must return at least one primary key or unique column. If none are present, an InvalidOperation exception is generated, and the commands are not generated. For more details on this, you may refer to the given MSDN Link: http://msdn.microsoft.com/en-us/library/tf579hcz.aspx[^] I hope this helps. Regards, Allen

        Allen Smith Software Engineer ComponentOne LLC www.componentone.com

        A Offline
        A Offline
        asha_s
        wrote on last edited by
        #3

        thanks i put the primery key but it give me error in update statment please help if you can

        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