Subject: Beginning ASP.NET 2.0 with C# - Chapter08
Posted By: tbroom Post Date: 8/31/2006 10:16:07 AM
Beginning ASP.NET 2.0 with C# - Chapter08 - First Try it out

1.    Ch. 8, page 266. Try It Out 2. “add all of the fields in the checklist” Should it not read “add all the columns in the checklist”?
Does one select the “*” or select all the columns individually?
2.    Ch. 8, page 267. Try It Out 2. Select GridView1 “Repeat for the other fields that are not selected” What other fields? Do I select all the fields listed in the “available fields” list box?
3.    Ch. 8, page 267. Try It Out 7. Is one suppose to be able to “Update” the data in this try it out step for if you do attempt to you get this:
Server Error in '/Chapter08' Application.
Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[NotSupportedException: Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified.]
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +210
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +179
   System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1140
   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +835
   System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +162
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
   System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +118
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +175
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

4.    Ch. 8, page 267. How it Works: “<asp:SqlDataSource ID="SqlDataSource1".. UpdateCommand="UPDATE [Fixtures] SET [FixtureDate] = @FixtureDate, [FixtureType] = @FixtureType, [GoalsFor] = @GoalsFor, [GoalsAgainst] = @GoalsAgainst, [Notes] = @Notes, [Opponents] = @Opponents WHERE [FixtureID] = @original_FixtureID">” cannot be found in the source view as it is pointed out in the book.

One cannot find this iether:        
  <UpdateParameters>
            <asp:Parameter Name="FixtureDate" Type="DateTime" />
            <asp:Parameter Name="FixtureType" Type="String" />
            <asp:Parameter Name="GoalsFor" Type="Int16" />
            <asp:Parameter Name="GoalsAgainst" Type="Int16" />
            <asp:Parameter Name="Notes" Type="String" />
            <asp:Parameter Name="Opponents" Type="String" />
            <asp:Parameter Name="original_FixtureID" Type="Int32" />
            </UpdateParameters>



Go to topic 48822

Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181
Return to index page 180
Return to index page 179