Upgrades Questions on upgrading to version 7.x.
Version 7.x > Upgrades > Transformation Error after upgrade View modes: 
User avatar
Member
Member
Pete - 12/4/2012 8:33:17 PM
   
Transformation Error after upgrade
I upgraded from 6 to 7 and now whenever I try to edit a transformation, I get an error bascially saying:
[DataConnection.HandleError]: Query: INSERT INTO CMS_Transformation ([TransformationName], [TransformationCode], [TransformationType], [TransformationClassID], [TransformationCheckedOutByUserID], [TransformationCheckedOutMachineName], [TransformationCheckedOutFilename], [TransformationVersionGUID], [TransformationGUID], [TransformationLastModified], [TransformationIsHierarchical], [TransformationHierarchicalXML], [TransformationCSS] ) VALUES ( @TransformationName, @TransformationCode, @TransformationType, @TransformationClassID, @TransformationCheckedOutByUserID, @TransformationCheckedOutMachineName, @TransformationCheckedOutFilename, @TransformationVersionGUID, @TransformationGUID, @TransformationLastModified, @TransformationIsHierarchical, @TransformationHierarchicalXML, @TransformationCSS); SELECT SCOPE_IDENTITY() AS [TransformationID]: caused exception: Must declare the scalar variable "@TransformationCheckedOutByUserID"

User avatar
Member
Member
Pete - 12/7/2012 11:03:17 PM
   
RE:Transformation Error after upgrade
A little help please? This occurs anytime I attempt to save a transformation. I restored my version 6 installation and attempted to upgrade to 7 and the same thing continues to occur. I would really appreciate a little help here.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/11/2012 9:06:33 AM
   
RE:Transformation Error after upgrade
Hello Pete,

This issue was already solved on our forums.
Could you please read this threads as first? Thank you.

1. Database error
2. 'Must declare the scalar variable "@ID"' error

Best regards,
Martin Danko

User avatar
Member
Member
Pete - 12/12/2012 8:08:56 PM
   
RE:Transformation Error after upgrade
Sorry but those do not help as my collation is already properly set. I was able to get that error message to go away by executing the following:
update CMS_Query 
set QueryText = 'UPDATE CMS_Transformation

SET
[TransformationName] = @TransformationName,
[TransformationCode] = @TransformationCode,
[TransformationType] = @TransformationType,
[TransformationClassID] = @TransformationClassID,
[TransformationVersionGUID] = @TransformationVersionGUID,
[TransformationGUID] = @TransformationGUID,
[TransformationLastModified] = @TransformationLastModified,
[TransformationIsHierarchical] = @TransformationIsHierarchical,
[TransformationHierarchicalXML] = @TransformationHierarchicalXML,
[TransformationCSS] = @TransformationCSS
WHERE [TransformationID] = @TransformationID'
where ClassID = 162 and QueryName = 'update'

However, now when I attempt to create a new site, it fails with the following:
ERROR: Error during import process
Message: [DataConnection.HandleError]: Query: INSERT INTO CMS_PageTemplate ([PageTemplateDisplayName], [PageTemplateCodeName], [PageTemplateDescription], [PageTemplateIsPortal], [PageTemplateCategoryID], [PageTemplateLayoutID], [PageTemplateWebParts], [PageTemplateIsReusable], [PageTemplateShowAsMasterTemplate], [PageTemplateInheritPageLevels], [PageTemplateLayout], [PageTemplateLayoutCheckedOutFileName], [PageTemplateLayoutCheckedOutByUserID], [PageTemplateLayoutCheckedOutMachineName], [PageTemplateVersionGUID], [PageTemplateHeader], [PageTemplateGUID], [PageTemplateLastModified], [PageTemplateSiteID], [PageTemplateForAllPages], [PageTemplateType], [PageTemplateLayoutType], [PageTemplateCSS], [PageTemplateFile] ) VALUES ( @PageTemplateDisplayName, @PageTemplateCodeName, @PageTemplateDescription, @PageTemplateIsPortal, @PageTemplateCategoryID, @PageTemplateLayoutID, @PageTemplateWebParts, @PageTemplateIsReusable, @PageTemplateShowAsMasterTemplate, @PageTemplateInheritPageLevels, @PageTemplateLayout, @PageTemplateLayoutCheckedOutFileName, @PageTemplateLayoutCheckedOutByUserID, @PageTemplateLayoutCheckedOutMachineName, @PageTemplateVersionGUID, @PageTemplateHeader, @PageTemplateGUID, @PageTemplateLastModified, @PageTemplateSiteID, @PageTemplateForAllPages, @PageTemplateType, @PageTemplateLayoutType, @PageTemplateCSS, @PageTemplateFile); SELECT SCOPE_IDENTITY() AS [PageTemplateID]: caused exception: Must declare the scalar variable "@PageTemplateLayoutCheckedOutFileName". Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectType(SiteImportSettings settings, String objectType, Boolean siteObject, TranslationHelper th, ProcessObjectEnum process, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectsData(SiteImportSettings settings) Must declare the scalar variable "@PageTemplateLayoutCheckedOutFileName". at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

Again, my version 6 installation works fine. But whenever I upgrade to 7, these are the errors that come up. It appears something is not right somewhere.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/20/2012 7:40:06 AM
   
RE:Transformation Error after upgrade
Hi,

could you please tell me which version of SQL Sever are you running? Also are you using automatic updatev via KIM or manual?

Best regards,
Martin Danko

User avatar
Member
Member
Pete - 12/20/2012 5:39:29 PM
   
RE:Transformation Error after upgrade
Martin,

SQL Server 2008 R2 Express. I've attempted an update via KIM and manually following the instructions in the PDF.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/25/2012 9:35:38 AM
   
RE:Transformation Error after upgrade
Hi Pete,

Could you please try to restore back to v6, update the KIM first (take a look at: KB - How to hotfix setup files) and then try to upgrage again via KIM.

Best regards,
Martin Danko

User avatar
Member
Member
Pete - 4/18/2013 10:50:42 PM
   
RE:Transformation Error after upgrade
Two months after I asked the question you guys posted a solution (updating this for others):
http://devnet.kentico.com/Knowledge-Base/Upgrading/Must-declare-the-scalar-variable-exception-after-u.aspx