Knowledgebase

Search:     Advanced search

TestTrack Type Mismatch ODBC Error

Article ID: 325  |  Last updated: 31 Dec, 2014

Problem

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

Type mismatch in expression

Cause

The CUSTMVAL.CUSTVALUE is a pop-up custom field and was not converted to an integer prior to comparing against the FLDCUSTM.IDRECORD.

Solution

To query a pop-up custom field using ODBC, the CUSTVALUE field type must be changed to an integer. The following Access query example shows you how to change the field type.

The example query includes a Cint command in the 'Where' clause. The Cint command changes the CUSTVALUE field in this query to an integer so it can be compared against the IDRECORD field of the FLDCUSTM Table. This query assumes you want information for one custom field.

SELECT DEFECTS.DEFECTNUM
, DEFECTS.SUMMARY
, DEFECTS.STATUS
, REPORTBY.DESCRPTN
, FLDCUSTM.DESCRIPTOR
, USERS.LASTNAME
, CUSTMVAL.CUSTVALUE
FROM CUSTMVAL AS CUSTMVAL
, DEFECTS
, FLDCUSTM AS FLDCUSTM
, REPORTBY
, USERS
WHERE REPORTBY.IDDEFREC=DEFECTS.IDRECORD
And REPORTBY.IDFOUNDBY=USERS.IDRECORD
And CUSTMVAL.IDDEFREC=DEFECTS.IDRECORD
And Cint(CUSTMVAL.CUSTVALUE)=FLDCUSTM.IDRECORD
And CUSTMVAL.IDCUSTREC=FLDCUSTM.IDCUSTREC
And CUSTMVAL.IDCUSTREC = 1

Check the CUSTMDEF table for the IDRECORD value of the custom field you want to query. Make sure you change the CUSTMVAL.IDCUSTREC field to return the correct custom field.

Article ID: 325  |   Last updated: 31 Dec, 2014
Tags
ODBC custom field Access type mismatch

Prev   Next
TestTrack Server System Requirements     TestTrack Web Clients Return a 404-Page Not Found Error