+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / String or binary would be truncated error after site move

String or binary would be truncated error after site move

6 posts, 0 answered
  1. Joann
    Joann avatar
    2 posts
    Registered:
    30 Apr 2013
    06 Feb 2014
    Link to this post
    Why would I get this error after a site move?  Is there an IIS environment setting that could cause it, or is it database related? 

    [SQLException: String or binary data would be truncated.
    The statement has been terminated.]
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.executeUpdate(String sql) +183
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.execute(String sql) +5
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.ExecuteSqlScript(String script, Connection con, SqlDriver sqlDriver, Boolean noShredder) +300
     
    [OpenAccessException: SQL exception on 'ALTER TABLE [fs_Applicants] ALTER COLUMN [resume_notes] varchar(255) NULL' : String or binary data would be truncated.
    The statement has been terminated.]
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +7
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.throwBuildException(String str, Exception e) +49
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.ExecuteSqlScript(String script, Connection con, SqlDriver sqlDriver, Boolean noShredder) +349
       OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.runScript(String script) +106
       OpenAccessRuntime.DataObjects.tools.ant.ExecuteScriptTask.execute() +282
     
    [OpenAccessException: Telerik.OpenAccess.OpenAccessException: SQL exception on 'ALTER TABLE [fs_Applicants] ALTER COLUMN [resume_notes] varchar(255) NULL' : String or binary data would be truncated.
    The statement has been terminated.]
       Telerik.Sitefinity.Data.OA.OpenAccessConnection.UpgradeDatabase(Database database) +128
       Telerik.Sitefinity.Data.OA.OpenAccessConnection.UpdateMetadata(MetadataSource metadataSource, String moduleName, List`1 dynamicTypesToRegister, IOpenAccessMetadataProvider provider) +2548
     
    [Exception: Unable to upgrade database schema metadataSource provided by 'JobListings.Data.OpenAccessDataProvider': Telerik.OpenAccess.OpenAccessException: SQL exception on 'ALTER TABLE [fs_Applicants] ALTER COLUMN [resume_notes] varchar(255) NULL' : String or binary data would be truncated.
    The statement has been terminated.]
       DynamicModule.ns.Wrapped_OpenAccessDataProvider_9d559085507e40b78a319da66690ade1.Initialize(String providerName, NameValueCollection config, Type managerType) +198
       Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +1381
       Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +57
       Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +301
       Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +118
       JobListings.PublicControls.ApplicationWidget.InitializeControls(GenericContainer controlContainer) +48
       Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +52
       System.Web.UI.Control.EnsureChildControls() +83
       System.Web.UI.Control.PreRenderRecursiveInternal() +42
       System.Web.UI.Control.PreRenderRecursiveInternal() +155
       System.Web.UI.Control.PreRenderRecursiveInternal() +155
       System.Web.UI.Control.PreRenderRecursiveInternal() +155
       System.Web.UI.Control.PreRenderRecursiveInternal() +155
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
  2. Vasya Stankova
    Vasya Stankova  avatar
    12 posts
    Registered:
    03 Nov 2014
    07 Feb 2014
    Link to this post
    Hello,

    Could you please tell me the exact steps to reproduce the observed issue? Any additional information will be much appreciated.

    Regards,
    Vasya Stankova
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
  3. Joann
    Joann avatar
    2 posts
    Registered:
    30 Apr 2013
    19 Feb 2014 in reply to Vasya Stankova
    Link to this post
    The existing code and database were simply moved from one server to another.  When the widget page is visited, the above error is thrown.  It would seem to point to a server configuration issue, but the host is Smarterasp, who replies that their server is compatible with Sitefinity requirements.
  4. Georgi Mateev
    Georgi Mateev avatar
    12 posts
    Registered:
    02 Mar 2016
    24 Feb 2014
    Link to this post
    Hi Joann,
    It looks like there is a problem with the database because an upgrade has been triggered. If you want to transfer the database you have to create a backup and then restore the backup on the second server. Can you confirm that this is the way you handled this? Also the connection string have to reference the new database.

    Regards,
    Georgi Mateev
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
  5. Anton
    Anton avatar
    1 posts
    Registered:
    11 Mar 2015
    24 May
    Link to this post
    Please can  you tell us how to stop the upgrade as i am experiencing the same problem and don't understand why the system would trigger a upgrade if the DB and Code is exactly the same, the only diffidence is the server? 
  6. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    29 Nov 2016
    27 May
    Link to this post
    Hello Anton,

    Upgrade should not be triggered if on an already working project a database 'backup > restore' and copy of the whole solution files is performed. 
     
    The upgrade is triggered in case of higher version of the Sitefinity assemblies referenced, or re-upgrade in case of change/different version of the modules records in SystemConfig file or  "sf_module_vrsn" table for the respective Sitefinity version.

    You can check the connection string and if it points to the correct "new" database (to the server where it is restored).
    In "sf_schema_vrsns" table you can also check the actual modules version and if they are the same as the assemblies version.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
6 posts, 0 answered