While using a database block, the user may get an Error Message "Can not execute query". There can be multiple reasons for this error message. Let's have a look at below scenarios and their resolution.
Scenario 1: User has not configured DSN properly.
This can happen if the DSN is not configured as recommended. Please follow the guidelines in the below articles for working with different data sources/database.
Scenario 2: User has specified whitespace between part of names in DSN.
LEAPWORK don't support DSN names with whitespace in between so, please remove whitespace if any. Please refer below
Scenario 3: User has not used the same version of applications.
Please note that LEAPWORK Studio, ODBC Driver and Database all 3 software should run under the same bit version. i.e if you have 64-bit LEAPWORK please install ODBC Driver and database also of the 64-bit version. And if LEAPWORK Studio is 32-bit, install the 32-bit version of ODBC Driver and database.
Basically, an ODBC driver is, typically, a dynamic link library (DLL) which is loaded by its parent application. You absolutely cannot mix 32bit application and 64bit driver (or vice-versa). All executables, DLLs, etc that share the same process space must be the same bit'ness.
For any clarification, please contact our Priority Support.