NAV2013 upgrade error

ruben_callensruben_callens Member Posts: 2
edited 2014-08-16 in NAV Three Tier
Dear,

I'm stuck on the upgrade to NAV2013.
This is in the second fob in the "Transfer data" step.

I first got an error on the function "UpdateDimSetIdInWorkTables()". (CU 104049)

I fixed that with adding custom code:
          IF TempDimSetEntry."Dimension Value Code" <> '' THEN BEGIN
            /// my custom code 20131202 RC START: add the dimension values to their table if they don't exit
            GRec_DimensionValue.RESET;
            GRec_DimensionValue.SETRANGE(Code ,TempDimSetEntry."Dimension Value Code");
            GRec_DimensionValue.SETRANGE("Dimension Code", TempDimSetEntry."Dimension Code");
            IF GRec_DimensionValue.FINDFIRST = FALSE THEN BEGIN
              GRec_DimensionValue.INIT;
              GRec_DimensionValue."Dimension Code" := TempDimSetEntry."Dimension Code";
              GRec_DimensionValue.Code := TempDimSetEntry."Dimension Value Code";
              GRec_DimensionValue.INSERT;
              MESSAGE('DimensionValue Created: %1',GRec_DimensionValue.Code);
            END;
            /// end of my custom code RC stop
            TempDimSetEntry.INSERT(TRUE);


Now i get an error in the next function "UpdateParentTable(DimTableID : Integer;ParentTableID : Integer;SourceDimFieldName : Text[80];DestDimFieldName : Text[80])" (CU 104049)

I get following error while running for the "ledger entry dimension":
"This message is for C/AL programmers: A call to System.Int32.get_HasRows failed with this message: The type of one or more arguments does not match the method's parameter type."

The error is produced on this line of code:

"IF SQLReader.HasRows THEN"
Window.UPDATE(3,Text011);
SQLMgt.GetSQLConnection(SQLConnection);
SQLConnection.Open;
SQLCommand := SQLCommand.SqlCommand;
SQLCommand.Connection := SQLConnection;
SQLCommand.CommandTimeout(0); // wait indefinitely for the command to finish.
IF ParentTableID <> 0 THEN BEGIN
  KeyOffset := 0;
  SQLCommand.CommandText := UpdateLedgerEntryTableQry(ParentTableID,KeyOffset,DestDimFieldName);
  SQLCommand.CommandTimeout(0); // wait indefinitely for the command to finish.
  SQLCommand.ExecuteNonQuery;
END ELSE BEGIN
  SQLMgt.GetSQLConnection(SQLConnection2);
  SQLConnection2.Open;
  SQLCommand2 := SQLCommand2.SqlCommand(TableIDReaderQry,SQLConnection2);
  SQLCommand2.CommandTimeout(0); // wait indefinitely for the command to finish.
  SQLReader := SQLCommand2.ExecuteReader;
  IF SQLReader.HasRows THEN
    WHILE SQLReader.Read DO BEGIN
      ParentTableID2 := SQLReader.GetInt32(0);  // Parent Table ID
      Window.UPDATE(2,GetTableName(ParentTableID2));
      ....


Could anyone give me some advise?
This is an error in the function in a dll.

Thx in advance

Comments

Sign In or Register to comment.