Knowledgebase

Search:     Advanced search

TestTrack ODBC Call Failed Error #1024

Article ID: 324  |  Last updated: 30 Dec, 2014

Note: The following information only applies to TestTrack 2011.1.3 and earlier.

Problem

When querying a Microsoft Access database that links to a TestTrack project, the following error is returned:

ODBC-Call Failed. [Seapine software][TestTrack ODBC Dr (#1024)]

Cause

The query is using a date field in the 'Where' clause of the SQL statement. The date field uses Access formatting.

Example query

SELECT DEFECTS.DEFECTNUM, DEFECTS.SUMMARY, DEFECTS.DATEENTER
FROM DEFECTS
WHERE DEFECTS.DATEENTER=#7/31/2001#;

Solution

There are two solutions:

  1. If limiting the query by a single date, use a 'Like' statement instead of an '='.

    SELECT DEFECTS.DEFECTNUM, DEFECTS.SUMMARY, DEFECTS.DATEENTER
    FROM DEFECTS
    WHERE DEFECTS.DATEENTER like '07/31/0
    1'
  2. If you want to find a count of records between two dates, you need to use the 'Format' statement around each date field. The format statement reformats the dates into the format expected by the ODBC driver. See the following example:

    SELECT Count(DEFECTS.IDRECORD) AS CountOfIDRECORD
    FROM DEFECTS
    Where Format(DEFECTS.DATEENTER,"mm/dd/yy") Between format('08/01/01',"mm/DD/yy") And format('08/02/01',"mm/DD/yy");

Example query

The following query prompts you for the start and end dates you want to use each time you run the query:

SELECT Count(DEFECTS.IDRECORD) AS CountOfIDRECORD
FROM DEFECTS
Where Format(DEFECTS.DATEENTER,"mm/DD/yy") Between Format([Start Date],"mm/DD/yy") And Format([End Date],"mm/DD/yy");

Article ID: 324  |   Last updated: 30 Dec, 2014
Tags
ODBC Access SQL query call failed

Prev   Next
TestTrack Server Does Not Start at Boot Time on Linux     Enabling Image File Attachment Thumbnails