I have a SqlDataSource and an <asp:ListView> setup to handle comments on another form, with the following textbox:
<asp:TextBox ID="CommentTextBox" runat="server" Text='<%# Bind("Comment") %>' Width="400px" Height="125px" TextMode="MultiLine" /> The datasource has the following InsertCommand and asp:Parameter set on it:
InsertCommand="INSERT INTO [tblSLS_SpecComments] ([SpecID], [Author], [Comment]) VALUES (@SpecID, @Author, @Comment)" <asp:Parameter Name="SpecID" Type="Int32" /> <asp:Parameter Name="Author" Type="String" /> <asp:Parameter Name="Comment" Type="String" /> When I try to insert a longer comment (an example would be 500 'f's), I get an error:
String or binary data would be truncated.
The statement has been terminated.
The column that I'm inserting into is of datatype nvarchar(max), so it should be able to hold about a book's worth of characters, which is substantially fewer than I'm handing it.
Any clue about what's going on?