Quantcast
Channel: Dynamics GP Support and Services Blog
Viewing all articles
Browse latest Browse all 1037

Conversion failed when converting the varchar value 'XXXXX' to data type int.

$
0
0

Hello -

When upgrading to Microsoft Dynamics GP 2015 R2, you may encounter the following error message:
Conversion failed when converting the varchar value 'XXXXX' to data type int.


Here is an example of a corresponding call that you would see in the Dexsql.log file:

UPDATE ASIEXP86 SET ASI_Field_Number = CASE WHEN ASI_Field_Number = 24453 THEN 24452 ELSE 24453 END, ASI_Column_Display_Name = CASE WHEN ASI_Column_Display_Name = 24453 THEN 24452 ELSE 24453 END WHERE ASI_Favorite_Dict_ID = 0 and ASI_Favorite_Type = 12 and ASI_Favorite_Name <> '' and ASI_Field_Number in (24453,24452)
/*
/* Date: 08/06/2015 Time: 8:50:59
SQLSTATE:(22005) Native Err:(245) stmt(11354784):*/
[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the varchar value 'Debit ' to data type int.*/

 

If you encounter this issue, you can definitely troubleshoot it at the point of failure.

To resolve this issue, please do the following:

A. Run these scripts to find the records causing this error to occur:

     1. Select asi_column_display_name, asi_field_number, asi_favorite_name, * From DYNAMICS..ASIEXP86 where asi_field_number = 24452

     2. Select asi_column_display_name, asi_field_number, asi_favorite_name, * From DYNAMICS..ASIEXP86 where asi_field_number = 24453

   >>>In the results returned by these two scripts, the results in the ASI_Column_Display_Name should only be numeric values. The first script should only return 24452 in this column and the second script should only return 24453.

   If you have any other values besides 24452 or 24453, then you'll need to remove the records from the ASIEXP86 table.


B. I would recommend making a backup of this table, using the following script:

     Select * into DYNAMICS..ASIEXP86BAK from DYNAMICS..ASIEXP86


C. To remove the invalid records from the ASIEXP86 table, you can use a script such as this:

     
Delete DYNAMICS..ASIEXP86 where ASI_Column_Display_Name = 'xxxxxxx'

**Note: Replace xxxxxxx with the non-numeric value that you see in the results from the Dexsql.log file.


D. Once you remove the invalid records, run the two scripts mentioned previously again, and verify that the ASI_Column_Display_Name column only shows 24452 for the first script and 24453 for the second script.

     1. Select asi_column_display_name, asi_field_number, asi_favorite_name, * From DYNAMICS..ASIEXP86 where asi_field_number = 24452

     2. Select asi_column_display_name, asi_field_number, asi_favorite_name, * From DYNAMICS..ASIEXP86 where asi_field_number = 24453


E. If the column shows the correct values, you can then launch Dynamics GP 2015 R2 Utilities again and continue with the upgrade of the DYNAMICS system database again, which should get past this ASIEXP86 error message.

Thank you!
Sarah
Microsoft Dynamics


Viewing all articles
Browse latest Browse all 1037

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>