<?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[Using ODBC on remote agent to test table value]]></title><description><![CDATA[<p dir="auto">I'm trying to get a Windows remote agent to read an ODBC sourced database (a CSV file), that contains a single row of data. I've added the ODBC nsm and configure as per the wiki the agent with:</p>
<p dir="auto">Query = Name:TempSensorTemp DSN:TempSensor Query:"select 'Temperature Value' from 'database.csv'"</p>
<p dir="auto">Whenever I try to create a DCI as ODBC.QueryResult(TempSensorTemp) I get an error that it's unsupported by the agent.</p>
<p dir="auto">The agent log shows:</p>
<p dir="auto">[01-Jul-2013 18:19:53.460] [session:0] Requesting parameter "ODBC.QueryResult(TempSensorTemp)"<br />
[01-Jul-2013 18:19:53.805] [session:0] GetParameterValue(): result is 404 (UNKNOWN_PARAMETER)</p>
<p dir="auto">Can anyone tell me where my config is wrong? I have a similar ODBC call from another app to the same database and my query does work.</p>
]]></description><link>https://forum.netxms.org/topic/2467/using-odbc-on-remote-agent-to-test-table-value</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:46:10 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2467.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Jul 2013 17:24:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Wed, 03 Jul 2013 16:59:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/10698">Using ODBC on remote agent to test table value</a>:</p>
<blockquote>
<p dir="auto">Try to replace odbcquery.nsm with attached one. Should work!</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Perfect, it's all working now. Many thanks.</p>
<p dir="auto">It's working for this CSV DSN and also a SQLite one I'm also testing.</p>
]]></description><link>https://forum.netxms.org/post/10699</link><guid isPermaLink="true">https://forum.netxms.org/post/10699</guid><dc:creator><![CDATA[Taomyn]]></dc:creator><pubDate>Wed, 03 Jul 2013 16:59:47 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Wed, 03 Jul 2013 16:33:55 GMT]]></title><description><![CDATA[<p dir="auto">Try to replace odbcquery.nsm with attached one. Should work!</p>
<p dir="auto">Best regards,<br />
Victor</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001233-odbcquery.nsm">odbcquery.nsm</a></p>
]]></description><link>https://forum.netxms.org/post/10698</link><guid isPermaLink="true">https://forum.netxms.org/post/10698</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 03 Jul 2013 16:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Wed, 03 Jul 2013 10:26:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/10694">Using ODBC on remote agent to test table value</a>:</p>
<blockquote>
<p dir="auto">Yes, just found a bug in ODBCQUERY subagent. Are you using 32 or 64 bit version? I'll post patched subagent here.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">64bit on both server and agent</p>
]]></description><link>https://forum.netxms.org/post/10696</link><guid isPermaLink="true">https://forum.netxms.org/post/10696</guid><dc:creator><![CDATA[Taomyn]]></dc:creator><pubDate>Wed, 03 Jul 2013 10:26:00 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Wed, 03 Jul 2013 09:57:21 GMT]]></title><description><![CDATA[<p dir="auto">Yes, just found a bug in ODBCQUERY subagent. Are you using 32 or 64 bit version? I'll post patched subagent here.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10694</link><guid isPermaLink="true">https://forum.netxms.org/post/10694</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 03 Jul 2013 09:57:21 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Wed, 03 Jul 2013 09:18:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/10691">Using ODBC on remote agent to test table value</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">Don't forget to put query parameter into correct section, ODBC, like this:</p>
<pre><code>SubAgent = odbcquery.nsm

*ODBC
Query = TempSensorTemp:TempSensor:select 'Temperature Value' from 'Draycott Corp.csv':60
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Ah, can't believe I missed that, thanks again. Unfortunately I still have an issue in that data I receive is not correct - no errors now in the debug logging.</p>
<p dir="auto">I've left it running for a bit and exported the values, here's a small sample:</p>
<p dir="auto">"03.07.2013 10:21:43","??8"<br />
"03.07.2013 10:20:43","??1"<br />
"03.07.2013 10:19:43","??1"<br />
"03.07.2013 10:18:43","??5"<br />
"03.07.2013 10:17:43","??5"<br />
"03.07.2013 10:16:43","??5"<br />
"03.07.2013 10:15:43","??9"<br />
"03.07.2013 10:14:43","??9"<br />
"03.07.2013 10:13:43","??3"</p>
<p dir="auto">On the console, the ?? appear as Chinese characters. I have tried setting the value as both string and floating-point (which is what the value is) and it's the same.</p>
<p dir="auto">I wanted to add, I just used Microsoft's ODBC test tool as I wanted to be sure this wasn't a 32bit/64bit ODBC issue - my other working connection is 32bit.</p>
<p dir="auto">I used the tool to confirm both DSNs and it all seems well:</p>
<p dir="auto">Connect to DSN</p>
<p dir="auto">    Full Connect(Default)</p>
<p dir="auto">    Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3</p>
<p dir="auto">    Successfully connected to DSN 'TempSensor'.</p>
<p dir="auto">select "Temperature Value" from "Draycott Corp.csv"</p>
<p dir="auto">SQLExecDirect:<br />
                In:				Statementhandle = 0x0000000000177FB0, StatementText = "select "Temperature Value" from "Draycott Corp.csv...", Statementlength = 51<br />
                Return:	SQL_SUCCESS=0</p>
<p dir="auto">Get Data All:<br />
"Temperature Value"<br />
19.94<br />
1 row fetched from 1 column.</p>
]]></description><link>https://forum.netxms.org/post/10693</link><guid isPermaLink="true">https://forum.netxms.org/post/10693</guid><dc:creator><![CDATA[Taomyn]]></dc:creator><pubDate>Wed, 03 Jul 2013 09:18:55 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Tue, 02 Jul 2013 20:59:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Don't forget to put query parameter into correct section, ODBC, like this:</p>
<pre><code>SubAgent = odbcquery.nsm

*ODBC
Query = TempSensorTemp:TempSensor:select 'Temperature Value' from 'Draycott Corp.csv':60
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10691</link><guid isPermaLink="true">https://forum.netxms.org/post/10691</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 02 Jul 2013 20:59:07 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Tue, 02 Jul 2013 17:12:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/10687">Using ODBC on remote agent to test table value</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">Looks like documentation page is misleading. You supposed to replace "Name", "DSN", etc. with actual values. Your configuration record should be</p>
<p dir="auto">Query = TempSensorTemp:TempSensor:select 'Temperature Value' from 'database.csv':60</p>
<p dir="auto">(60 at the end means poll every 60 seconds).</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Thanks, but still not working. My exact lines are now:</p>
<p dir="auto">SubAgent = odbcquery.nsm<br />
Query = TempSensorTemp:TempSensor:select 'Temperature Value' from 'Draycott Corp.csv':60</p>
<p dir="auto">and the debug log on the agent machine still shows:</p>
<p dir="auto">[02-Jul-2013 18:06:39.590] [session:0] Received message CMD_GET_PARAMETER<br />
[02-Jul-2013 18:06:39.865] [session:0] Requesting parameter "ODBC.QueryResult(TempSensorTemp)"<br />
[02-Jul-2013 18:06:40.434] [session:0] GetParameterValue(): result is 404 (UNKNOWN_PARAMETER)<br />
[02-Jul-2013 18:06:40.994] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)</p>
<p dir="auto">or if I put quotes on the query:</p>
<p dir="auto">[02-Jul-2013 18:06:39.590] [session:0] Received message CMD_GET_PARAMETER<br />
[02-Jul-2013 18:06:39.865] [session:0] Requesting parameter "ODBC.QueryResult("TempSensorTemp")"<br />
[02-Jul-2013 18:06:40.434] [session:0] GetParameterValue(): result is 404 (UNKNOWN_PARAMETER)<br />
[02-Jul-2013 18:06:40.994] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)</p>
]]></description><link>https://forum.netxms.org/post/10690</link><guid isPermaLink="true">https://forum.netxms.org/post/10690</guid><dc:creator><![CDATA[Taomyn]]></dc:creator><pubDate>Tue, 02 Jul 2013 17:12:47 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC on remote agent to test table value on Mon, 01 Jul 2013 20:40:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Looks like documentation page is misleading. You supposed to replace "Name", "DSN", etc. with actual values. Your configuration record should be</p>
<p dir="auto">Query = TempSensorTemp:TempSensor:select 'Temperature Value' from 'database.csv':60</p>
<p dir="auto">(60 at the end means poll every 60 seconds).</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10687</link><guid isPermaLink="true">https://forum.netxms.org/post/10687</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 01 Jul 2013 20:40:48 GMT</pubDate></item></channel></rss>