The problem: you receive an error while trying to delete a business contact or account: "error converting data type int to smallint". You can make changes to the contact, just not delete it.
This problem occurs when there are more than 32,767 (the number that a smallint can handle at max) business contacts in the database and you try to delete one of the contacts beyond 32,767.
When deleting a business contact dbo.DeleteContactoid gets called which itself calls dbo.UpdatePhoneLogs. dbo.UpdatePhoneLogs accepts @ContactServiceID and @GrandParentContactServiceID as smallints. Change both parameters to int and you're set.
Download and install SQL Management Studio: SQL Management Studio 2008 R2. You'll need to download the version of SQL to match your version of Windows.
To make the change, use SQL Management Studio and expand {database name} > Programmability > Stored Procedures.
- Right click on dbo.UpdatePhoneLogs and choose Modify
- Change @ContactServiceID and @GrandParentContactServiceID to int
- Parse and Execute.
- You can verify the change was successful by reopening the modify window.
Thanks Diane. We came across this error and we were a little baffled by the vagueness of the error. We applied your suggested change and resolved the issue.
The OS supported by Microsoft SQL Server 2008 R2 RTM - Management Studio Express, following your link, https://www.microsoft.com/en-us/download/details.aspx?id=22985, are old, being the newest W7. What could I do as user of W10?
Many thanks in advance
I haven't checked this yet - but if it won't work with the latest updates installed, then you'll need SQL 2012 or 2014.