If I create a configuration for the Query parameter, everything works correctly. NetXMS connects to the database and the DCI returns the correct value. If I change the same Query parameter to a ConfigurableQuery parameter (and modify its value according to the documentation) and modify the metric to the query name and put a value in parentheses to replace the ? in the query, an empty result set is always returned. I have verified this on three drivers (mssql, mysql and pgsql). If I separately validate the query in another application, everything works correctly.
Configuration sample
ConfigurableQuery = Database.Data:id1:Custom data:SELECT `name` FROM `test` WHERE `description` LIKE "?";
			
			
			
				You can try to run agent with DebugLevel = 6 in it's config - actual query and detail of execution should be visible in the log. Pls share the log part related to execution of the query.
			
			
			
				It seems that ? is not going to be replaced by a metrics argument.
2025.04.07 13:24:03.180 *D* [comm.cs.1          ] Requesting metric "Database.Data(foo)"
2025.04.07 13:24:03.180 *D* [dbquery            ] H_DirectQueryConfigurable: Executing query "SELECT `name` FROM `test` WHERE `description` LIKE "?";" in database "id1"
			
			
			
				Try removing quotes around the question mark: 
ConfigurableQuery = Database.Data:id1:Custom data:SELECT `name` FROM `test` WHERE `description` LIKE ?; 
			
			
			
				Quotes removed:
2025.04.08 10:13:13.718 *D* [comm.cs.1          ] Requesting metric "Database.Data(foo)"
2025.04.08 10:13:13.718 *D* [dbquery            ] H_DirectQueryConfigurable: Executing query "SELECT `name` FROM `test` WHERE `description` LIKE ?;" in database "id1"
Result is fine.
But if I add my own text to the value (e.g. LIKE %?), an error is logged You have an error in your SQL syntax.
The metric only works when I put the whole condition in the metric brackets (it must not be in the configuration file).