String or binary would be truncated error after site move
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) +974Hello,
Could you please tell me the exact steps to reproduce the observed issue? Any additional information will be much appreciated.
Regards,
Vasya Stankova
Telerik
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.
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
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?
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.