L
Learning SQL Server
I am trying to update a datarow via in-place editing from a dataset stored
in session.
When I try to write the new value into the selected row, I always get the
following error : Column [blah] is read-only.
in my UpdateCommand:
dim objDS as DataSet = Ctype(Session("foo"), DataSet)
If IsNothing(objDS) = false then
dim objDT as DataTable = objDS.Tables(0)
dim objRow as DataRow = objDT.Select("Type=" +
e.Item.Cells(1).Text.ToString)
' TERMINATES ON THIS LINE:
objRow(0)("Column1") = CType(e.Item.Cells(2).Controls(0), TextBox).Text
...
End If
I am following the example provided in Dino Esposito's text Building Web
Solutions with ASP.NET and ADO.NET. This doesnt work though. Why?
in session.
When I try to write the new value into the selected row, I always get the
following error : Column [blah] is read-only.
in my UpdateCommand:
dim objDS as DataSet = Ctype(Session("foo"), DataSet)
If IsNothing(objDS) = false then
dim objDT as DataTable = objDS.Tables(0)
dim objRow as DataRow = objDT.Select("Type=" +
e.Item.Cells(1).Text.ToString)
' TERMINATES ON THIS LINE:
objRow(0)("Column1") = CType(e.Item.Cells(2).Controls(0), TextBox).Text
...
End If
I am following the example provided in Dino Esposito's text Building Web
Solutions with ASP.NET and ADO.NET. This doesnt work though. Why?