String or binary would be truncated error after site move

Posted by Community Admin on 03-Aug-2018 16:35

String or binary would be truncated error after site move

All Replies

Posted by Community Admin on 06-Feb-2014 00:00

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

Posted by Community Admin on 07-Feb-2014 00:00

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

Posted by Community Admin on 19-Feb-2014 00:00

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.

Posted by Community Admin on 24-Feb-2014 00:00

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

Posted by Community Admin on 24-May-2016 00:00

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? 

Posted by Community Admin on 27-May-2016 00:00

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
 

This thread is closed