<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ConfigurableQuery is probably not working properly]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">Configuration sample<br />
ConfigurableQuery = Database.Data:id1:Custom data:SELECT `name` FROM `test` WHERE `description` LIKE "?";</p>
]]></description><link>https://forum.netxms.org/topic/8146/configurablequery-is-probably-not-working-properly</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:38:53 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8146.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Apr 2025 04:43:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ConfigurableQuery is probably not working properly on Tue, 08 Apr 2025 08:28:17 GMT]]></title><description><![CDATA[<p dir="auto">Quotes removed:<br />
2025.04.08 10:13:13.718 *D* [comm.cs.1          ] Requesting metric "Database.Data(foo)"<br />
2025.04.08 10:13:13.718 *D* [dbquery            ] H_DirectQueryConfigurable: Executing query "SELECT `name` FROM `test` WHERE `description` LIKE ?;" in database "id1"<br />
Result is fine.<br />
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.<br />
The metric only works when I put the whole condition in the metric brackets (it must not be in the configuration file).</p>
]]></description><link>https://forum.netxms.org/post/34319</link><guid isPermaLink="true">https://forum.netxms.org/post/34319</guid><dc:creator><![CDATA[saksham.adyso]]></dc:creator><pubDate>Tue, 08 Apr 2025 08:28:17 GMT</pubDate></item><item><title><![CDATA[Reply to ConfigurableQuery is probably not working properly on Mon, 07 Apr 2025 13:55:35 GMT]]></title><description><![CDATA[<p dir="auto">Try removing quotes around the question mark:</p>
<p dir="auto">ConfigurableQuery = Database.Data:id1:Custom data:SELECT `name` FROM `test` WHERE `description` LIKE ?;</p>
]]></description><link>https://forum.netxms.org/post/34316</link><guid isPermaLink="true">https://forum.netxms.org/post/34316</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 07 Apr 2025 13:55:35 GMT</pubDate></item><item><title><![CDATA[Reply to ConfigurableQuery is probably not working properly on Mon, 07 Apr 2025 11:26:50 GMT]]></title><description><![CDATA[<p dir="auto">It seems that ? is not going to be replaced by a metrics argument.<br />
2025.04.07 13:24:03.180 *D* [comm.cs.1          ] Requesting metric "Database.Data(foo)"<br />
2025.04.07 13:24:03.180 *D* [dbquery            ] H_DirectQueryConfigurable: Executing query "SELECT `name` FROM `test` WHERE `description` LIKE "?";" in database "id1"</p>
]]></description><link>https://forum.netxms.org/post/34310</link><guid isPermaLink="true">https://forum.netxms.org/post/34310</guid><dc:creator><![CDATA[saksham.adyso]]></dc:creator><pubDate>Mon, 07 Apr 2025 11:26:50 GMT</pubDate></item><item><title><![CDATA[Reply to ConfigurableQuery is probably not working properly on Mon, 07 Apr 2025 05:38:13 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://forum.netxms.org/post/34304</link><guid isPermaLink="true">https://forum.netxms.org/post/34304</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 07 Apr 2025 05:38:13 GMT</pubDate></item></channel></rss>