I am running the latest version of the Clear Company scripts and I am getting this message on every company.
"Conversion failed when converting the varchar value 'MyInterID' to data type int.
The other odd thing is I cannot add the TWO company. GP Utilities goes through all the motions but the record for TWO never gets added to the SY01500 table.
Has anyone ever experienced this? Any clues as to how to correct?
I downloaded what I think is the current ClearCompanies and I don't see a reference to MyInterID. It would help me if you posted what you're running.
Have you put a trigger on SY01500?
I would run a SQL TRACE to see the exact cause.
Failure to add the TWO company is consistent with INSERT/UPDATE failure similar to your Clear company issue.
The problem was with this table - DYNAMICS..syDeployedReports. I had to remove the SY01500.INTERID value for each company. Once I did that the ClearCompany script ran with no issues and the TWO company is now created. This is very odd and one night when I cannot sleep I will try to figure out what caused this.
The version I have for the ClearCompanyDB script is dated June 2014 & supposed to be compatible with GP 2013 and the SL Designer..
I woulnd't have suspected that the syDeployedReports could be causing issues here.. but nonetheless, ths is one of those tables you have to be very careful when creating a new TEST enviornment for a future upgrade.. read on here
As explained by Microsofot (Sarah Purdy) here (blogs.msdn.microsoft.com/.../microsoft-dynamics-gp-ssrs-reports-and-deployment), GP Utilities automatically re-deploys SSRS & Excel reports based on the content of this table, whith the adverse effect of scrapping your existing enviromnet if you don't change the values inside that table first.
The main problem with the syDeployedReports table is that it has the 'CompanyID' column as a varchar data type, whereas, every other table that has a companyID or CMPANYID column, such as the SY01500 table (Company Master) that it references, is setup as a smallint data type.
The issue with the ClearCompanies script is that it attempts to compare the company ID values from other tables to the SY01500 and runs into an issue when it has a varchar value trying to compare it to a smallint value, thus the error message.
This is why the syDeployedReports table is probably 99% of the issues we see running the ClearCompanies script.
Hello Derek, I am having the same issue when running the ClearCompanies script under my Test environment. How can I solve this issue? I need to run this script because we deleted a company database in SQL Server Management Studio before it was deleted from Microsoft Dynamics GP.
Normally when the ClearCompanies script fails, it'll throw an error message about what the varchar value is that it is trying to an integer value but cannot, similar to the error at the very beginning of this forum post.
What you'll need to do is run a script or something looking for that value in the tables of the DYNAMICS/system database, then when you find what table/columns this value is in, verify that it is a column setup as a varchar and not an integer.
As mentioned above, the most common table that causes this is the syDeployedReports table, you can try making a backup of that database, truncating this table, run the ClearCompanies script then if it is successful, put the data back into this table.
Thank you very much! I will do that!
Business Applications communities