• datagrid won’t update (ASP.NET)

    Home » Forums » Developers, developers, developers » DevOps Lounge » datagrid won’t update (ASP.NET)

    Author
    Topic
    #432278

    I am so close to figuring this out but the only thing I’m having a problem with is the data won’t update. I’ve looked at several examples and it should work, but I’m thinking I’m missing just one little dumb thing that I’m staring at but not seeing. I’m attaching the code since it’s too long to display here. As you can see, I’m looking at the IsPostBack but it just seems like somewhere I’m calling the old data back . Is there possibly a problem with the fact that I’m using a view for the grid and updating the underlying table?

    Viewing 0 reply threads
    Author
    Replies
    • #1013695

      Hi Peggy,

      I’m a bit rusty on DataGrid code, but I didn’t see anything in your code that looked incorrect.

      Have you tried stepping through the code in Debug mode? Also you may want to use SQL Profiler to capture the exact SQL statement that’s being sent to SQL from the code.

      Hope this helps!

      • #1013708

        Thanks, Mark for verifying that it looked like it should work.

        I tried debugging and the variables showed up and everything, but when the moment arrived to update, it did nothing. So when I return to work, I’ll try the SQL Profiler and see if this gives me a clue. I’m thinking that the server isn’t playing nice, but I’ll let you know how it goes.

        • #1013710

          Hi Peggy – one more thought. The permissions on the SQL server could be the problem. If the user account you’re using (either windows authentication or SQL login) doesn’t have write permissions on the table(s) involved, this could also explain the issue.

          • #1014001

            Mark,

            I finally got it to work! The SQL profiler helped a lot because I noticed that it was trying to update the table with the incorrect field. Then a few more tweaks were in order and now it works. It wasn’t a permission thing; I guess I just can’t count.

            Thanks so much for your help! hailpraise

    Viewing 0 reply threads
    Reply To: datagrid won’t update (ASP.NET)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: