Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    datagrid won't update (ASP.NET)

    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?
    Carpy Diem, it's .

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datagrid won't update (ASP.NET)

    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!

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datagrid won't update (ASP.NET)

    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.
    Carpy Diem, it's .

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datagrid won't update (ASP.NET)

    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.

  5. #5
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datagrid won't update (ASP.NET)

    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! <img src=/S/hailpraise.gif border=0 alt=hailpraise width=27 height=22>
    Carpy Diem, it&#39;s .

Posting Permissions

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