If you look at the snippet of code taken from what you posted.
objTextBox = E.Item.FindControl("edit_price")
If(Left(objTextBox.Text, 1) = "$")Then
objTextBox.Text = Right(objTextBox.Text, Len(objTextBox.Text) -1)
End If
there is no
objCommand.Parameters("@Price").Value = objTextBox.Text
or similar - setting the value of the @Price parameter before the rest of the code is executed.
objCommand.Connection.Open()
objCommand.ExecuteNonQuery()
grdAuthors.EditItemIndex = -1
objCommand.Connection.Close()
BindGrid()
Quote:
quote:Originally posted by SPRIBob
Jonathan;
I actually went on from here and completed the book. I'm about to start the book Professional VB.NET. I would like to know what was wrong and what caused this error. It is the only unanswered problem I encounterred in the book.
Thank you,
SPRIBob
|
I did not try the code out, nevertheless I hope it will help.
Jonathan Crossland
http://www.jonathancrossland.com