View Single Post
  #1 (permalink)  
Old September 5th, 2006, 12:12 AM
desk_star desk_star is offline
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data Binding - Editing GridView Row Data

In my book at page 363 the authors start explaining how to set things up to enable data update - editing a row in other words.

We get the content for the SqlDataSource's UpdateCommand which contains "UPDATE [Customers] SET [CompanyName] = @CompanyName ... WHERE [CustomerID] = @original_CustomerID".

Then in the explanation they mention these "@something" explaining what they are:parameters or placeholders for the corresponding information from the selected row in the GridView. This is pretty good so far but this time, however they talk about a @CustomerID parameter, completely ignoring that a few lines above they wrote @original_CustomerID.

Of course the code is not working this way so I changed @original_CustomerID to @CustomerID which did nothing to fix my problem. I was not getting the error anymore but no update whatsoever.

I'm pretty pissed off with them ignoring to explain this and many other things.Not to mention that the book could've been half the number of pages - a lot of bla, bla, bla on not so important matters like what you can do without coding at all. There are hundreds of documents and webcasts on how to do that already. They should've made the book lighter and fill it with substance.

I found something: a SqlDataSource parameter called OldValuesParameterFormatString which has to do with this but I don't want to detail as I'm still doing research ... Of course, instead understanding it in 20 minutes, from the book I paid for, I have to waste a lot of time.

Thanks, Professional ASP 2.0 authors.

Oh, if anybody bothers to read these messages and has a clue about my problem, please, don't be shy. I just needed to express my disappointment.