SAP Knowledge Base Article - Public

2261004 - Error: "HY000:[Simba][DSI] (40390) SwapWriteError" when refreshing a report based on Salesforce.com in Crystal Reports

Symptom

  • Error when refreshing a report connected to Salesforce.com   
  • When refreshing a report based on Salesforce.com in Crystal Reports, it fails with the error:
     
    "Database Connector Error: 'HY000:[Simba][DSI] (40390) Internal error - SwapWriteError. [Database Vendor Code: 40390]"

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
       
  • Salesforce.com

Reproducing the Issue

  1. In Crystal Reports, create a report off Salesforce.com
  2. Insert at least on database field in the details section of the report.
  3. When refreshing the report, it fails with the error:
     
    "Database Connector Error: 'HY000:[Simba][DSI] (40390) Internal error - SwapWriteError. [Database Vendor Code: 40390]"

Cause

  • This error occurs when the Simba ODBC driver for Salesforce.com does not have access to the MS Windows user temp directory to write temporary files.
  • This temporary files are important to bring all the records to the Client machine and do local linking and sorting if the query complicated and Driver unable to convert SQL to SOQL.

Resolution

  • Add the registry key: SwapFilePath, and point to a directory the Microsoft Windows User have full rights.
      
    1. Go to the Microsoft Registry Editor
      1. In Microsoft Windows, under the Start menu, select “Run
      2. Open the MS Registry Editor, by entering the command: Regedit
           
    2. In the Microsoft Registry Editor, navigate to the following path:
        
      • For 32bit version of Microsoft Windows:
        HKEY_LOCAL_MACHINE\SOFTWARE\Simba\Simba Salesforce ODBC Driver\Driver  
        •            
      • For 64bit version of Microsoft Windows:
        HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Simba\Simba Salesforce ODBC Driver\Driver
        •  
               
    3. Then add the string: SwapFilePath
      1. Right click on “Driver”, and select “New – String Value”
      2. Enter the name: SwapFilePath     
           
    4. Set the value for SwapFilePath to a directory the user can write to, for example:  "C:\MyDirectory"
         
    5. Close the “MS Registry Editor”
    6. Make sure there is enough space on Hard drive to accept temp files with the size over 20 GB. Temp files will be deleted after report completed.
            
      Start Crystal Reports, and you will now be able to refresh you report successfully.

Keywords

CR, SForce, Saleforce , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016