Forum Discussion

markhost's avatar
markhost
Visitor
9 years ago

How an I get TestComplete to recognize "is null" in a DB query?

I am trying to use a DB variable to pull some data to use for testing, but TestComplete doesn't seem able to recognize the "is null" keyword.  My query is in the form of:

 

SELECT
field1,
field2,
field3,
field4
FROM
table
WHERE
field5 = somevalue and field6 = anothervalue and field7 is null

 

When I test the query in TestComplete, it pulls back data, but the data is wrong.  It is recognizing everything but the "is null" part of the query.  The query works fine if I log into the db admin tool and gets the desired result, but it won't work in TestComplete.  Is there something I'm missing?

  • You might need to select the proper Providor/Driver for connecting to the specific database you have. For instance I connect to a remote SQL Server database, and I needed to install and use the SQL Server Native Client.

     

    Just for reference here's where I'm talking about setting it in TestComplete:

     

     

    If you are using the default Microsoft ODBC driver it might not have the IS NULL functionality. You'll have to research installing the proper driver for the database you are trying to connect to. Though if it's working through your DB admin tool then it's most likely already installed.