<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[REXYGEN Community Forum / Help with DbDrv error - connecting to database]]></title>
	<link rel="self" href="https://www.rexygen.com/oldforum/extern.php?action=feed&amp;tid=390&amp;type=atom"/>
	<link href="http://www.rexygen.com/oldforum/viewtopic.php?id=390"/>
	<updated>2017-10-26T03:23:04Z</updated>
	<generator>FluxBB</generator>
	<id>http://www.rexygen.com/oldforum/viewtopic.php?id=390</id>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1788#p1788"/>
		<content type="html"><![CDATA[<p>Thanks for that spot Tomas, I&#039;ve modified that file so much, I&#039;m deleting things that I shouldn&#039;t <img src="http://www.rexygen.com/oldforum/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>Anyway I&#039;ve mostly got everything sorted with your help.&#160; The only odd thing that is happening, is the system log is showing duplicate entry errors.&#160; I looks like it&#039;s trying to send 2 entries with the exact same datetime stamp.&#160; I&#039;ve &#039;fixed&#039; it by changing the line to </p><div class="codebox"><pre><code>INSERT IGNORE</code></pre></div><p>as the values are appearing in the database normally.&#160; Also, when a 0 value is sent, the value the database shows a blank line after the entry, which seems a bit weird.</p><p>I&#039;m going to smother the 0 value send anyway, as I&#039;m not interested in a 0 value rainfall, only the actual rainfall values.&#160; I&#039;ll check back in when I have this sorted out.</p><p>Michael.</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-26T03:23:04Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1788#p1788</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1751#p1751"/>
		<content type="html"><![CDATA[<p>Hi Michael,</p><p>it seems that you are missing first opening bracket in your SQL query. It should look like:</p><div class="codebox"><pre><code>INSERT INTO rainfall (siteId, sensorId, temp) VALUES (11816, &#039;top#50&#039;, ?1);</code></pre></div><p>Please, can you specify which combination of Raspbian image and REX Control System worked/did&#039;n work for you? Just to see if the issue is on our site.</p><p>Thank you for cooperation.</p><p>Regards, Tomas</p>]]></content>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2017-10-16T10:16:21Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1751#p1751</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1748#p1748"/>
		<content type="html"><![CDATA[<p>OK, so using a fresh install of Jessie seems to fix most of the problems.&#160; I&#039;m just having the following error, which is obviously complaining about the syntax in the RIO file, which I&#039;m not why.</p><div class="quotebox"><blockquote><div><p>DBDRV: SQL error detail (code=1064, state=&#039;37000&#039;, string=&#039;[MySQL][ODBC 5.1 Driver][mysqld-5.5.52-MariaDB]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near &#039;siteId, sensorId, temp) VALUES (11816, &#039;top#50&#039;, 1)&#039; at line 1&#039;)</p></div></blockquote></div><p>I&#039;ll have an ask of my database-ing friend, but, I&#039;ve posted it here, in case someone has an insight to what the cause may be.</p><p>Thanks<br />Michael</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-13T04:58:10Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1748#p1748</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1747#p1747"/>
		<content type="html"><![CDATA[<p>I&#039;m wondering if this is a Raspbian Stretch issue.&#160; I&#039;m going to load Jessie and see if I have the same issues.</p><p>EDIT:Just confirmed that the 2 previous Pis&#039; (both the working and non-working one) were using Jessie, so I probably chased my tail a bit on that one, anyway I&#039;ll try a fresh install of Jessie on the fresh Pi and see how we go.</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-12T04:57:26Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1747#p1747</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1746#p1746"/>
		<content type="html"><![CDATA[<p>OK still no go, fresh install of stretch, fresh windows install and Rexcore v2.50.5 produces the following error:</p><div class="quotebox"><blockquote><div><p>DBDRV: connect to &#039;DRIVER=MySQL;SERVER=***.**.*.**;PORT=3306;DATABASE=n**;UID=root;PWD=**********;;&#039; failed!!!! ([01000] [unixODBC][Driver Manager]Can&#039;t open lib &#039;MySQL&#039; : file not found)</p></div></blockquote></div><p>*I blanked out the actual IP and database name, as well as password as I copied this straight from RexView</p><p>EDIT:Since it looks like a MySQL error, I&#039;ll install that and make sure I can connect to the database from the command line, which I was able to do before, even with the errors in Rex.</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-12T04:08:01Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1746#p1746</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1745#p1745"/>
		<content type="html"><![CDATA[<p>Hmmm, I notice that the most recent version is 2.50.5.&#160; What I might do (since I do have another fresh Pi handy) is uninstall and reinstall the latest version of the windows programmer and upload the config to the fresh Pi and see what happens.</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-11T22:38:17Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1745#p1745</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1744#p1744"/>
		<content type="html"><![CDATA[<p>Thanks Tomas and Jaroslav, I&#039;ve emailed the files in a 7zip to the support email address.</p><p>I forgot to add my version of Rex on my PC is 2.50.1</p><p>Ideally I&#039;d like to have a solution within the next week or so.&#160; I realise the main holdup has been me <img src="http://www.rexygen.com/oldforum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Michael</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-11T02:56:29Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1744#p1744</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1741#p1741"/>
		<content type="html"><![CDATA[<p>Hi Michael,</p><p>please, can you send all your project files (including DB configuration file *.rio) so I can have a look at it? Post it here or send it to support(at)rexcontrols.com.</p><p>Thank you, Tomas</p>]]></content>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2017-10-05T12:18:12Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1741#p1741</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1738#p1738"/>
		<content type="html"><![CDATA[<p>Hi Michael,<br />thanks for the information. For a complete record, what version of REX development tools do you have on your PC? In RexDraw, go to Help-&gt;About RexDraw. I should have asked for this in my previous post, sorry for that.</p><p>How critical is this issue for you? How fast do you need it working?</p><p>Thanks,<br />Jaroslav</p>]]></content>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2017-10-04T07:10:23Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1738#p1738</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1736#p1736"/>
		<content type="html"><![CDATA[<p>Ok so working PI version:<br />RexCore version: 2.50.1 revision 7567<br />and /etc/odbcinst.ini:</p><div class="quotebox"><blockquote><div><p>[PostgreSQL ANSI]<br />Description=PostgreSQL ODBC driver (ANSI version)<br />Driver=psqlodbca.so<br />Setup=libodbcpsqlS.so<br />Debug=0<br />CommLog=1<br />UsageCount=1</p><p>[PostgreSQL Unicode]<br />Description=PostgreSQL ODBC driver (Unicode version)<br />Driver=psqlodbcw.so<br />Setup=libodbcpsqlS.so<br />Debug=0<br />CommLog=1<br />UsageCount=1</p><p>[MySQL]<br />Description=MySQL Driver<br />Driver=libmyodbc.so<br />Setup=libodbcmyS.so<br />UsageCount=1</p><p>[PostgreSQL]<br />Description=PostgreSQL Driver<br />Driver=psqlodbcw.so<br />Setup=libodbcpsqlS.so<br />UsageCount=1</p><p>[MSSQL]<br />Description=Microsoft SQL (FreeTDS) Driver<br />Driver=libtdsodbc.so<br />Setup=libtdsS.so<br />UsageCount=1</p></div></blockquote></div><p>The Pi thats not working:<br />RexCore version: 2.50.5 revision 8614<br />and /etc/odbcinst.ini:</p><div class="quotebox"><blockquote><div><p>[PostgreSQL ANSI]<br />Description=PostgreSQL ODBC driver (ANSI version)<br />Driver=psqlodbca.so<br />Setup=libodbcpsqlS.so<br />Debug=0<br />CommLog=1<br />UsageCount=1</p><p>[PostgreSQL Unicode]<br />Description=PostgreSQL ODBC driver (Unicode version)<br />Driver=psqlodbcw.so<br />Setup=libodbcpsqlS.so<br />Debug=0<br />CommLog=1<br />UsageCount=1</p><p>[MySQL]<br />Description=MySQL Driver<br />Driver=libmyodbc.so<br />Setup=libodbcmyS.so<br />UsageCount=1</p><p>[PostgreSQL]<br />Description=PostgreSQL Driver<br />Driver=psqlodbcw.so<br />Setup=libodbcpsqlS.so<br />UsageCount=1</p><p>[MSSQL]<br />Description=Microsoft SQL (FreeTDS) Driver<br />Driver=libtdsodbc.so<br />Setup=libtdsS.so<br />UsageCount=1</p></div></blockquote></div><p>Nothing is jumping out at me, other than the slight difference in versions of RexCore?</p><p>Anyway, thanks again in advance!</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-10-04T01:12:31Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1736#p1736</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1735#p1735"/>
		<content type="html"><![CDATA[<p>Thanks for the quick reply Jaroslav, I&#039;m away for the weekend, but, I&#039;ll get back to you ASAP when I&#039;m back with my Pi&#039;s!</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-09-30T22:15:19Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1735#p1735</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1733#p1733"/>
		<content type="html"><![CDATA[<p>Hi Michael,<br />sorry to hear about your troubles. Something might be wrong with the ODBC connector configuration. What version of REX are you running on your Raspberry Pi?</p><div class="codebox"><pre><code>RexCore -v</code></pre></div><p>Can you please check the /etc/odbcinst.ini on both devices? Are they the same?</p><div class="codebox"><pre><code>cat /etc/odbcinst.ini</code></pre></div><p>Thanks,<br />Jaroslav</p>]]></content>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2017-09-29T12:39:26Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1733#p1733</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Help with DbDrv error - connecting to database]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1732#p1732"/>
		<content type="html"><![CDATA[<p>Hi all, I have 2 Raspberry Pi&#039;s, one is connecting to my database fine, the other throws the following errors continuously:</p><div class="quotebox"><blockquote><div><p>2017-09-29;15:21:39.362;Error;DBDRV: SQL error detail (code=1065&#160; &#160;&#160; state=&#039;S1000&#039;&#160; &#160;&#160; string=&#039;[MySQL][ODBC 5.1 Driver][mysqld-5.5.52-MariaDB]Query was empty&#039;);<br />2017-09-29;15:21:39.382;Error;DBDRV: SQL request failed (idx=3&#160; &#160;&#160; result=-1&#160; &#160;&#160; sql=&#039;&#039;);<br />2017-09-29;15:21:39.382;Error;DBDRV: SQL error detail (code=1065&#160; &#160;&#160; state=&#039;S1000&#039;&#160; &#160;&#160; string=&#039;[MySQL][ODBC 5.1 Driver][mysqld-5.5.52-MariaDB]Query was empty&#039;);<br />2017-09-29;15:21:39.522;Error;DBDRV: SQL request failed (idx=0&#160; &#160;&#160; result=-1&#160; &#160;&#160; sql=&#039;&#039;);<br />2017-09-29;15:21:39.522;Error;DBDRV: SQL error detail (code=1065&#160; &#160;&#160; state=&#039;S1000&#039;&#160; &#160;&#160; string=&#039;[MySQL][ODBC 5.1 Driver][mysqld-5.5.52-MariaDB]Query was empty&#039;);<br />2017-09-29;15:21:39.542;Error;DBDRV: SQL request failed (idx=1&#160; &#160;&#160; result=-1&#160; &#160;&#160; sql=&#039;&#039;);</p></div></blockquote></div><p>I have swapped the config from the working unit to the other one, with the same result.&#160; Did I forget to do something on the second unit, when I configured the database connector?</p><p>Thanks in advance<br />Michael</p>]]></content>
		<author>
			<name><![CDATA[mcarroll]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=136</uri>
		</author>
		<updated>2017-09-29T06:17:41Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1732#p1732</id>
	</entry>
</feed>
