home recent topics recent posts search faq  

Jitbit Software Forums Forum



register | lost password   open id sign in with Twitter
Messages in this topic - RSS

Home » HelpDesk » String or binary data would be truncated

Our web-based helpdesk software and hosted helpdesk
1/11/2010 3:18:02 PM

NGPIT
NGPIT
Posts: 22
Any time I put a lot of information in the message log I get the following error page. I am assuming that I hit the limit in SQL for the message. What is the limit? How can you increase the limit? Can the next version have a better error message?

Server Error in '/HelpDesk' Application. String or binary data would be truncated.
The statement has been terminated.
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.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

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:

[SqlException (0x80131904): String or binary data would be truncated.The statement has been terminated.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137 HelpDesk.BusinessLayer.IssueUtils.AddCommentToIssue(Int32 issueID, Int32 userID, String comment, Boolean forTechsOnly, Boolean suppressNotification) +482 HelpDesk.ViewIssue.btnAddComment_Click(Object sender, EventArgs e) +126 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

--
NGPIT

Currently using Jitbit HelpDesk Software v5.5.2.0
permalink
1/11/2010 3:19:12 PM

NGPIT
NGPIT
Posts: 22
Here is a better format for the error page.

Server Error in '/HelpDesk' Application.
--------------------------------------------------------------------------------
String or binary data would be truncated.
The statement has been terminated.
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.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
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:

[SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
HelpDesk.BusinessLayer.IssueUtils.AddCommentToIssue(Int32 issueID, Int32 userID, String comment, Boolean forTechsOnly, Boolean suppressNotification) +482
HelpDesk.ViewIssue.btnAddComment_Click(Object sender, EventArgs e) +126
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

--
NGPIT

Currently using Jitbit HelpDesk Software v5.5.2.0
permalink
1/12/2010 4:32:47 AM

wit01
wit01
Posts: 69
How did you install 3.7?

How "big" are you putting in? You can edit the SQL database yourself, the default limit for each "comment" added is 4000 characters
permalink
1/15/2010 2:49:43 PM

NGPIT
NGPIT
Posts: 22
The comment I was try to put in was a log that contained 13k+ characters. The database had the data type of nvarchar(4000) set for this field. I changed this to nvarchar(MAX) and now I am able to place my entire log into the comment field with no problem.
Wit01, thanks for pointing me in the right direction.

--
NGPIT

Currently using Jitbit HelpDesk Software v5.5.2.0
permalink
1/18/2010 4:17:30 AM

wit01
wit01
Posts: 69
No worries.

Just be aware that when you update your helpdesk to later versions (if you decide to update) the update.sql might reset that field back to 4000, so you'll have to change back to (max).
permalink
1/21/2010 3:18:55 PM

jitbit
jitbit
Administrator
Posts: 1306
Th eupgrade script will not touch this. We have used nvarchar(4000) to stay compatible with SQL 2000. I guess we'll wait a couple of months and change it to nvarchar(max).
permalink

Home » HelpDesk » String or binary data would be truncated





Powered by Jitbit Forum 7.2.10.0 © 2006-2011 Jitbit Software