Results 1 to 12 of 12

Thread: [RESOLVED] SQL Datagrid updating

Hybrid View

  1. #1
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: SQL Datagrid updating

    Your code is perfectly valid for a form, I have no idea why you only found aspx results.

    You can find out how many records were affected by your , I think via an argument to ExecuteNonQuery (or perhaps a property of the command). Based on what you have said it will almost certainly be 0, but you should check anyway.

    Assuming that returns 0, the next step is to add a Watch for update.Parameters , and check what the values are - you may be surprised.

    If that is valid too, check the data in the table to ensure that there is at least one record that exactly matches both conditions in your Where clause (including the parameter value).

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jul 2009
    Posts
    31

    Re: SQL Datagrid updating

    Let me show you the grid form its attached.

    ok so now this thing returns everything correctly from the sql database. The button on the left under the signout section is suppose to run the code above. after i click the button it does initiate the close command. But if i also double click one of the cells it closes as well. I think im missing something. more and i think my button control is responding to any cell instead of just the button. I think because of this

    Handles dvg1.CellContentClick
    Attached Images Attached Images  

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width