Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lewis 36 posts 116 karma points
    Oct 23, 2013 @ 11:38
    Lewis
    0

    Send email workflow - message field 'String or binary data would be truncated'

    Hi all

    Our client is trying to add some text to the 'Message' field of the 'Send Email' workflow. 3170 characters to be exact.

    On save the following error is shown 'String or binary data would be truncated. The statement has been terminated.'

    This is only happening on the staging environment, not on the development environment. 

    Does anyone know the name of the table/column where this data is stored? Thanks in advance.

    The full error message is below:

    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) +404
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6384429
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6386130
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +689
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +327
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +167
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) in E:\Source Control\Umbraco\6.1.5\src\umbraco.datalayer\SqlHelper.cs:229
    
    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) in E:\Source Control\Umbraco\6.1.5\src\umbraco.datalayer\SqlHelper.cs:236
       Umbraco.Forms.Data.Storage.SettingsStorage.InsertSettings(Guid id, Dictionary`2 settings) +471
       Umbraco.Forms.Data.Storage.WorkflowStorage.UpdateWorkflow(Workflow workflow) +893
       Umbraco.Forms.UI.Dialogs.editWorkflowDialog.Button1_Click(Object sender, EventArgs e) +2845
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
    

     

     

  • Jonathan Richards 288 posts 1742 karma points MVP
    Oct 23, 2013 @ 16:10
    Jonathan Richards
    102

    ALTER TABLE [dbo].[UFSettings] ALTER COLUMN [Value] nvarchar(MAX)

  • keilo 568 posts 1023 karma points
    Jun 12, 2014 @ 16:33
    keilo
    0

    Came across this while mapping long-text fields in Contour.

    Jonathan, thanks a million!

  • Paul Mieczkowski 6 posts 52 karma points
    Oct 06, 2016 @ 11:58
    Paul Mieczkowski
    0

    The correct statement for umbraco forms 4.3.2 is:

    ALTER TABLE [dbo].[UFRecordDataString] ALTER COLUMN [Value] nvarchar(MAX) NOT NULL

    This is a little contour bug, the value is initially set to 255 in the db, however the field template has the maxlenght of 500.

Please Sign in or register to post replies

Write your reply to:

Draft