Hi:
With my last attempt the SqlDataProvider log was not empty, here it is:
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'CultureCode', table 'Portal.dbo.PortalLocalization'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'CultureCode', table 'Portal.dbo.PortalSettings'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
/* script to move settings for portal default langugage here*/
/* migrate portal values to portalsettings */
DECLARE @PortalID int
DECLARE @PortalName nvarchar(128)
DECLARE @LogoFile nvarchar(50)
DECLARE @FooterText nvarchar(100)
DECLARE @Description nvarchar(500)
DECLARE @KeyWords nvarchar(500)
DECLARE @BackgroundFile nvarchar(50)
DECLARE @HomeTabId int
DECLARE @LoginTabId int
DECLARE @UserTabId int
DECLARE @AdminTabId int
DECLARE @SplashTabId int
DECLARE @DefaultLanguage nvarchar(10)
--Iterate through each portal
DECLARE Portals_Cursor CURSOR FOR
SELECT PortalID, PortalName, LogoFile, FooterText, Description, KeyWords, BackgroundFile, HomeTabId, LoginTabId, UserTabId, AdminTabId, SplashTabId,
DefaultLanguage
FROM dbo.Portals
OPEN Portals_Cursor
--get first
FETCH NEXT FROM Portals_Cursor
into @PortalID, @PortalName, @LogoFile, @FooterText, @Description, @KeyWords, @BackgroundFile, @HomeTabId, @LoginTabId, @UserTabId, @AdminTabId, @SplashTabId, @DefaultLanguage
WHILE @@FETCH_STATUS = 0
BEGIN
exec dbo.InsertPortalLocalization @PortalID,@DefaultLanguage, @PortalName, @LogoFile, @FooterText, @Description, @KeyWords, @BackgroundFile, @HomeTabId, @LoginTabId, @UserTabId, @AdminTabId, @SplashTabId, -1
--also update portalsettings to correct default language
UPDATE dbo.PortalSettings
SET CultureCode=@DefaultLanguage where PortalID=@PortalID
FETCH NEXT FROM Portals_Cursor
into @PortalID, @PortalName, @LogoFile, @FooterText, @Description, @KeyWords, @BackgroundFile, @HomeTabId, @LoginTabId, @UserTabId, @AdminTabId, @SplashTabId, @DefaultLanguage
END
CLOSE Portals_Cursor
DEALLOCATE Portals_Cursor