Error on Data Upgrade from NAV2009 to NAV2015

enrickos
Member Posts: 2
Hi,
I am doing an upgrade from NAV2009 to NAV2015, but on the Data Upgrade, I always get the following error (in german):
SessionId : 5124
CodeunitId : 104055
FunctionName : StartUpgrade
CompanyName : xxx
StartTime : 27.04.2016 16:16:31
Duration :
State : FailedPendingResume
Error : Fehler bei einem Aufruf von System.Data.SqlClient.SqlCommand.CommandText mit folgender Meldung: Das
Objekt mit dem Typ "System.String" kann nicht in den Typ "System.Int32" konvertiert werden.
(Error during a call to System.Data.SqlClient.SqlCommand.CommandText with the following message: the Object with the type "System.String" can not be converted in type "System. Int32".)
Any idea ?
Best regards.
I am doing an upgrade from NAV2009 to NAV2015, but on the Data Upgrade, I always get the following error (in german):
SessionId : 5124
CodeunitId : 104055
FunctionName : StartUpgrade
CompanyName : xxx
StartTime : 27.04.2016 16:16:31
Duration :
State : FailedPendingResume
Error : Fehler bei einem Aufruf von System.Data.SqlClient.SqlCommand.CommandText mit folgender Meldung: Das
Objekt mit dem Typ "System.String" kann nicht in den Typ "System.Int32" konvertiert werden.
(Error during a call to System.Data.SqlClient.SqlCommand.CommandText with the following message: the Object with the type "System.String" can not be converted in type "System. Int32".)
Any idea ?
Best regards.
0
Comments
-
Since it is impossible to use debugger in upgrade procedures to NAV2015,
try to split upgrade to smaler steps.
NAV2009 -> 2013
NAV2013 ->2015
Such errors mostly fixed as correction of data issues.
Th most hard code in upgrade toolkit is from 2009 to 2013.
So start NAV2009-> 2013 migration with debugger. I suppose you will catch an error.
Nav Upgrades and DEV outsourcing
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com0 -
Hi.
Did you find solution?
I've same issue. I'm find it happens during this call: UpgradeDimEntry.UpgradeTable(DATABASE::"Document Dimension",0);0 -
I do know there are issues with the Upgrade if the company name starts with a Number.0
-
Hello.
I solve it.
It was problem with reusing SQLCommand variable in one function.
I fixed 3 functions in cu 104049 UpdateDimensionEntry:
function UpdateDimSetIdInWorkTables
...
// GG >>
// Before this line SQLCommand var in use without problem .
// But when I try to use it again, adding another query...
//SQLCommand.CommandText := UpdateDimEntryQry;
// After this line I'm getting error:
// the Object with the type "System.String" can not be converted in type "System. Int32"
//SQLCommand.ExecuteNonQuery;
// I added new var SQLCommandUpd (same as SQLCommand)
// and replaced code with next lines:
SQLCommandUpd := SQLCommandUpd.SqlCommand(UpdateDimEntryQry,SQLConnection);
SQLCommandUpd.CommandTimeout(0);
SQLCommandUpd.ExecuteNonQuery;
// GG <<
...
function UpdateParentTable
...
// GG >>
//SQLCommand.CommandText := UpdateLedgerEntryTableQry(ParentTableID,KeyOffset,0,DestDimFieldName);
//SQLCommand.CommandTimeout(0); // wait indefinitely for the command to finish.
//SQLCommand.ExecuteNonQuery;
SQLCommandUpd := SQLCommandUpd.SqlCommand(UpdateLedgerEntryTableQry(ParentTableID,KeyOffset,0,DestDimFieldName),SQLConnection);
SQLCommandUpd.CommandTimeout(0);
SQLCommandUpd.ExecuteNonQuery;
// GG <<
...
IF HasTableField(ParentTableID2,DestDimFieldName) AND AreDimKeyAndParentKeyCompatible(KeyOffset,ParentKeyOffset) THEN BEGIN
// GG >>
//SQLCommand.CommandText := UpdateLedgerEntryTableQry(ParentTableID2,KeyOffset,ParentKeyOffset,DestDimFieldName);
//SQLCommand.ExecuteNonQuery;
SQLCommandUpd := SQLCommandUpd.SqlCommand(UpdateLedgerEntryTableQry(ParentTableID2,KeyOffset,ParentKeyOffset,DestDimFieldName),sqlconnection);
SQLCommandUpd.CommandTimeout(0);
SQLCommandUpd.ExecuteNonQuery;
// GG <<
END ELSE
IF NOT AreDimKeyAndParentKeyCompatible(1,0) THEN
ERROR(STRSUBSTNO(Text001Err,DimTableID,ParentTableID2)); // TODO:ERROR(STRSUBSTNO(Text001,DimTableID,ParentTableID2),DimTableID,'');
...
function CleanupTables
...
// GG >>
//SQLCommandOnClient.CommandText := TruncateDimTableQry(DimTableID);
//SQLCommandOnClient.ExecuteNonQuery;
SQLCommandOnClientUpd := SQLCommandOnClientUpd.SqlCommand(TruncateDimTableQry(DimTableID),SQLConnectionOnClient);
SQLCommandOnClientUpd.CommandTimeout(0);
SQLCommandOnClientUpd.ExecuteNonQuery;
// GG <<
...3 -
I ran into this as well today and the above solution fixed it. Thank you.0
-
Thanks Geogarin! You're a star! It worked like magic.0
-
Yep. This solved the problem. Ran into the same issue.0
-
Well done geogarin. Simple yet elegant solution that worked for me as well. I've done more upgrades than I can count that have come through NAV2015 and I've never seen this before. Very glad you were able to help us out here.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions