Salesforce

How Do I Use ODBC? (Magic xpi 4.9)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Use ODBC? (Magic xpi 4.9)

Magic xpi lets you access data from various database management systems using ODBC data sources. To access database data with an ODBC data source, you should configure a compatible ODBC driver. You set up drivers for User or System data sources in Windows’® ODBC Data Source Administrator. You can configure one or both types of data sources for a project.

Configuration

Configuring ODBC has three principal stages:

  • Stage 1: Adding an ODBC data source

  • Stage 2: Verifying its driver compatibility

  • Stage 3: Setting up ODBC in Magic xpi

Stage 1: Adding an ODBC Data Source

To add an ODBC Data Source, do the following:

  1. From the Windows Start menu, click Control Panel, and then double-click the Administrative Tools icon.

  2. Double-click the Data Sources (ODBC) icon to open the ODBC Data Source Administrator window.

  3. Click the…

    • User DSN tab to make the data only visible to you and only usable on the current machine, or

    • System DSN tab to make the data visible to all users on the current machine.

  1. Click Add.

  1. Select an appropriate driver for which you want to set up a data source, and then click Finish.

  2. In the ODBC setup wizard, enter your information.

Stage 2: ODBC Driver Compatibility

Use the Mgchkdrv.exe utility to perform a Magic xpi compatibility test.

  1. In the <Magic xpi installation>\Runtime\Magic xpa\Gateways folder, double-click on Mgchkdrv.exe.

  2. Click the Select Data Source button.

  3. Click the Machine Data Source tab, select the DSN that you created earlier, and then click OK.

The utility will perform the test and display the results along with the log.

If the test fails, the ODBC driver is not compatible with Magic xpi.

Stage 3: Setup ODBC with Magic xpi

These steps show how to set up the ODBC gateway with Magic xpi.

  1. Open the Magic xpi Studio. On the Project menu, click Settings to open the Settings dialog box.

  2. In the Settings dialog box's Resources section, create a new Database resource.

  3. From the DBMS field, select the ODBC option, and then click OK. Provide the DSN in the Data Source Name and User/Password if required.

  4. Click Validate to check that a connection was established successfully and then click Apply to finish.

You will now be able to use the ODBC database as your Data Mapper utility Source or Destination.

Troubleshooting

If you get an Unknown database error message, then enable the ODBC gateway in the Magic.ini file as follows:

  1. Close all applications that are part of Magic xpi Integration Platform. These include the Magic xpi Studio, Magic xpi Monitor, Magic xpi Server, and Magic xpa.

  2. Open the Magic.ini file located in the Magic xpi installation folder.

  3. Find the [Magic_Gateways] section.

  4. Go to the ;MGDB19=mgodbc.dll line and remove the semicolon (;) at the beginning of the line.

  5. After the equal sign (=) add the following path \Magic xpi\Gateways\<name of .dll file>.

The .dll file you chose to use should be one that is found in the Magic xpi/Gateways folder.

  1. Save and close the Magic.ini file.

  2. Re-open your Magic xpi Integration Platform.

Reference
Attachment 
Attachment