KB38: You are seeing unexplained exceptions or experiencing increased memory usage

Symptom

You are getting unexplained exceptions and experiencing increased memory usage when using Microsoft's ODBC drivers to connect to your third party database.

Cause

Microsoft's ODBC drivers leak memory over a long period of time.

Solution

When setting up your ODBC data source, use your database vendor's latest ODBC driver rather than the one provided with Windows.

To set up a database source:

  1. Click Start > Settings > Control Panel. The Control Panel dialog box appears.
  2. Double-click Administrative Tools. The Administrative Tools dialog box appears.
  3. Double-click Data Sources (ODBC). The ODBC Data Source Administrator dialog box appears.
  4. Click the System DSN tab.
  5. Click Add. The Create New Data Source dialog box appears.
  6. Select the vendor driver that is associated with your database. In this example, Oracle in XE has been selected, rather than Microsoft ODBC for Oracle.
  7. Click Finish. The ODBC Setup dialog box associated with your database appears. The specifics of this dialog box are dependant on the database driver you select. Typically, you:
    1. In Data Source Name, type the name of your database.
    2. In Description, type a description of your database.
    3. In the Database section, click Select. The Select Database dialog box appears.
    4. Browse to find your database.
    5. Click OK. The location of your database appears in the Database section.
  8. Click OK. Your new data source appears in the ODBC Data Source Administrator dialog box.
  9. Click OK.