<?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[QSQL SQLite problem]]></title><description><![CDATA[<p dir="auto">I've a problem with SQLite, when consulting the DB for a User and Pass it just doesn't work), I can ask if the user exist, but not if the password it's correct.</p>
<p dir="auto">@<br />
QSqlQuery sql;<br />
QString strSql = "SELECT Usuario,Clave,Administrador FROM UsuariosSistema WHERE Usuario=:usuario AND Clave=:clave";<br />
sql.prepare(strSql);<br />
sql.bindValue(":usuario", usuario);<br />
sql.bindValue(":clave", claveHash.toHex());<br />
@</p>
<p dir="auto">this code works in MySQL but not in SQLite, and in SQLite if I do this:</p>
<p dir="auto">@QSqlQuery sql;<br />
QString strSql = "SELECT Usuario,Clave,Administrador FROM UsuariosSistema WHERE Usuario=:usuario;<br />
sql.prepare(strSql);<br />
sql.bindValue(":usuario", usuario);@</p>
<p dir="auto">it works, but I need to get the password too, am I missing something? the DB has the same content..</p>
]]></description><link>https://forum.qt.io/topic/10472/qsql-sqlite-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 20:17:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/10472.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Oct 2011 16:28:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QSQL SQLite problem on Mon, 21 Nov 2011 09:01:01 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="JessyNay" date="1318822832"][quote author="ron9776" date="1318822074"]1<br />
qDebug()&lt;&lt;sql.lastError().text();[/quote]</p>
<p dir="auto">I don't get it, What were you trying to say? that's the first answer I got</p>
<p dir="auto">[/quote]</p>
<p dir="auto">It was a spam account. I removed the post and deleted the user.</p>
]]></description><link>https://forum.qt.io/post/117555</link><guid isPermaLink="true">https://forum.qt.io/post/117555</guid><dc:creator><![CDATA[troubalex]]></dc:creator><pubDate>Mon, 21 Nov 2011 09:01:01 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Mon, 17 Oct 2011 07:07:06 GMT]]></title><description><![CDATA[<p dir="auto">QByteArray::toHex() returns another QByteArray. Did you try to convert that into a QString before binding it to the SQL placeholder?</p>
]]></description><link>https://forum.qt.io/post/113525</link><guid isPermaLink="true">https://forum.qt.io/post/113525</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 17 Oct 2011 07:07:06 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Mon, 17 Oct 2011 03:40:32 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="ron9776" date="1318822074"]1<br />
qDebug()&lt;&lt;sql.lastError().text();[/quote]</p>
<p dir="auto">I don't get it, What were you trying to say? that's the first answer I got</p>
]]></description><link>https://forum.qt.io/post/113506</link><guid isPermaLink="true">https://forum.qt.io/post/113506</guid><dc:creator><![CDATA[JessyNay]]></dc:creator><pubDate>Mon, 17 Oct 2011 03:40:32 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Mon, 17 Oct 2011 01:33:03 GMT]]></title><description><![CDATA[<p dir="auto">the method toHex() returns a a QByteArray, so I wasn't casting it to a QString, it works now! thank you so much!! :D</p>
]]></description><link>https://forum.qt.io/post/113498</link><guid isPermaLink="true">https://forum.qt.io/post/113498</guid><dc:creator><![CDATA[JessyNay]]></dc:creator><pubDate>Mon, 17 Oct 2011 01:33:03 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Sun, 16 Oct 2011 21:51:36 GMT]]></title><description><![CDATA[<p dir="auto">I see, sorry SQLite can't accept Hex data types.<br />
"SQLite datatypes":<a href="http://www.sqlite.org/datatype3.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.sqlite.org/datatype3.html</a><br />
You should try to change them into QString to store.</p>
]]></description><link>https://forum.qt.io/post/113484</link><guid isPermaLink="true">https://forum.qt.io/post/113484</guid><dc:creator><![CDATA[zither]]></dc:creator><pubDate>Sun, 16 Oct 2011 21:51:36 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Sun, 16 Oct 2011 18:52:17 GMT]]></title><description><![CDATA[<p dir="auto">I don't have an error! It just doesn't take the</p>
<p dir="auto">@claveHash.toHex()@</p>
<p dir="auto">if I do qDebug() &lt;&lt; claveHash.toHex() the result is:</p>
<p dir="auto">@d033e22ae348aeb5660fc2140aec35850c4da997@</p>
<p dir="auto">And that's what I have in the DB</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qdebug">@<bdi>qDebug</bdi></a>()&lt;&lt;sql.lastError().text();@ returns nothing " "</p>
]]></description><link>https://forum.qt.io/post/113480</link><guid isPermaLink="true">https://forum.qt.io/post/113480</guid><dc:creator><![CDATA[JessyNay]]></dc:creator><pubDate>Sun, 16 Oct 2011 18:52:17 GMT</pubDate></item><item><title><![CDATA[Reply to QSQL SQLite problem on Sun, 16 Oct 2011 18:46:20 GMT]]></title><description><![CDATA[<p dir="auto">Please check with that, you got something.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qdebug">@<bdi>qDebug</bdi></a>()&lt;&lt;sql.lastError().text();@</p>
]]></description><link>https://forum.qt.io/post/113479</link><guid isPermaLink="true">https://forum.qt.io/post/113479</guid><dc:creator><![CDATA[zither]]></dc:creator><pubDate>Sun, 16 Oct 2011 18:46:20 GMT</pubDate></item></channel></rss>