Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Unable to cast object of type 'System.DBNull' to type 'System.String' occurs when you run the "Synchronize with CRM" function in the Microsoft Dynamics CRM 2011 Outlook Client


View products that this article applies to.

Symptoms

During synchronization of the Microsoft Dynamics CRM 2011 for Microsoft Office Outlook client, a user will receive the following error: 

"Microsoft CRM has encountered a problem and needs to close. We are sorry for the inconvenience." 

When reviewing the error details within the error dialog box by clicking "What does this error report contain?", the following error will be shown: 

"Unable to cast object of type 'System.DBNull' to type 'System.String'"

↑ Back to the top


Cause

The error is caused by a field in a local SQL CE database that contains a null value

↑ Back to the top


Resolution

Use the following steps to resolve this issue on a Windows XP machine:

1. Close Microsoft Office Outlook
2. Browse to C:\Documents and Settings\<Username>\Application Data\Microsoft\MSCRM\Client and delete the contents of this folder, which will include the local SDF files
3. Browse to C:\Documents and Settings\<Username>\Local Settings\Application Data\Microsoft\MSCRM\Client and delete the contents of this folder, which will include the local SDF files
4. Start Microsoft Office Outlook
5. When you start Outlook for the first time after deleting the SDF files, you will notice some slow performance. This is expected because the SDF files are being recreated.

Use the following steps to resolve this issue on a Windows Vista or Windows 7 machine:

1. Close Microsoft Office Outlook
2. Browse to C:\Users\<Username>\AppData\Roaming\Microsoft\MSCRM\Client and delete the contents of this folder, which will include the local SDF files
3. Browse to C:\Users\<Username>\AppData\Local\Microsoft\MSCRM\Client and delete the contents of this folder, which will include the local SDF files
4. Start Microsoft Office Outlook
5. When you start Outlook for the first time after deleting the SDF files, you will notice some slow performance. This is expected because the SDF files are being recreated.

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kbcrm, kb

↑ Back to the top

Article Info
Article ID : 2715605
Revision : 1
Created on : 1/7/2017
Published on : 6/1/2012
Exists online : False
Views : 212