DataTools HowTo: Connect to MS CRM with the Data Loader to MS CRM

in

Question:

When trying to connect to Microsoft CRM with the Data Loader to MS CRM I get the following error message:

==============================================

Unable to create MS CRM COM object. in ConnectTargetandResolve (spectab.bas) (25519)

NOTE: Be sure to check the log file for additional information.

==============================================

When I view the error log file it contains the following error details:

==============================================

02/18/2008 14:25:41 2 19 O Global From Connect (driver): SQL state 01000, message:

[Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

02/18/2008 14:26:06 4 19 O Global Unable to create MS CRM COM object.

==============================================

What do I need to do to connect to Microsoft CRM with the Data Loader to MS CRM?

Answer:

There are several steps you must follow to configure your workstation before DataTools can connect to MS CRM, as follows:

Preliminary Workstation Configuration

The DataTools installer automatically registers Microsoft CRM .DLL files for the following .NET Framework versions:

  • 1.0.3705
  • 1.1.4322
  • 2.0.50727

To verify these versions, select the Microsoft CRM entry in Add/Remove Programs or look in C:/Windows/Microsoft.NET/Framework.

If you have .NET Framework versions other than one of the versions listed above, you must register the Microsoft CRM .DLL files manually using the following steps.

To manually register Microsoft CRM .DLL files:

  1. Locate the latest version of .NET Framework.
  2. Locate the file REGASM.EXE file. It should be in the PATH environment variable or called with absolute paths.
  3. Locate DJMsCrmComObj.dll and DJMsCrmComObj3.dll in the InstallDir\Common800 folder (where "InstallDir" is the drive and directory path where DataTools is installed on your workstation).
  4. Those two .DLL files should be in that directory or called with absolute paths.

  5. To register the files, open a command prompt and type the following:
    • regasm.exe DjMsCrmComObj.dll /tlb /codebase
    • regasm.exe DjMsCrmComObj3.dll /tlb /codebase

Connection Details

There are additional steps you must follow to configure your workstation before DataTools can connect to MS CRM. Those steps are detailed in the documentation inside the Data Loader to Microsoft CRM. Here's how to find that documentation:

  1. Launch the Data Loader to Microsoft CRM.
  2. Click on the Help button (a blue question mark on the right end of the button bar).
  3. In the Help window, if the tabs labeled "Contents", "Index", etc., are not displayed by default, click on the "Show" button.
  4. Click on the "Index" tab and enter "Microsoft CRM" (without the quotation marks) in the keyword box.
  5. The second help topic that displays should be "Microsoft CRM". Double click on it to open the Help topic in the right side of the Help window.
  6. Follow the configuration instructions carefully.
  7. Tip: Print out their instructions because it will be much easier to follow the steps.