Qt Sql error coming from nowhere: No query Unable to fetch row










1














I have a client connected to a server, and it is also connected to a Sqlite3 database. When I receive a message from the server a get an QMessageBox showing an error




"No query Unable to fetch row"




I tried it with qDebug() outputs and by Debugging the application but the message is not produced by me nor thrown by any DB execution, since none is executed at the moment when I get the message.



Ok I figured out that the error is shown when I write something to the socket. The error does not affect anything, the program continues to run. Here is the code piece were the error is shown:



void ConnectionHandler::sendBytes(QByteArray bytes) 
QMessageBox::critical(0, "test", "test");
this->socket->write(bytes);
this->socket->flush(); // after this call the error message is shown
this->socket->waitForBytesWritten();
QMessageBox::critical(0, "test2", "test2");



I checked the bytes that are supposed to be written but they look like what they are supposed to!?



Screenshot of the error:
image of the error










share|improve this question























  • Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
    – agold
    Oct 22 '15 at 7:14










  • As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
    – wasp256
    Oct 22 '15 at 7:18










  • Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
    – agold
    Oct 22 '15 at 7:20










  • I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
    – wasp256
    Oct 22 '15 at 7:26










  • But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
    – agold
    Oct 22 '15 at 13:13















1














I have a client connected to a server, and it is also connected to a Sqlite3 database. When I receive a message from the server a get an QMessageBox showing an error




"No query Unable to fetch row"




I tried it with qDebug() outputs and by Debugging the application but the message is not produced by me nor thrown by any DB execution, since none is executed at the moment when I get the message.



Ok I figured out that the error is shown when I write something to the socket. The error does not affect anything, the program continues to run. Here is the code piece were the error is shown:



void ConnectionHandler::sendBytes(QByteArray bytes) 
QMessageBox::critical(0, "test", "test");
this->socket->write(bytes);
this->socket->flush(); // after this call the error message is shown
this->socket->waitForBytesWritten();
QMessageBox::critical(0, "test2", "test2");



I checked the bytes that are supposed to be written but they look like what they are supposed to!?



Screenshot of the error:
image of the error










share|improve this question























  • Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
    – agold
    Oct 22 '15 at 7:14










  • As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
    – wasp256
    Oct 22 '15 at 7:18










  • Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
    – agold
    Oct 22 '15 at 7:20










  • I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
    – wasp256
    Oct 22 '15 at 7:26










  • But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
    – agold
    Oct 22 '15 at 13:13













1












1








1







I have a client connected to a server, and it is also connected to a Sqlite3 database. When I receive a message from the server a get an QMessageBox showing an error




"No query Unable to fetch row"




I tried it with qDebug() outputs and by Debugging the application but the message is not produced by me nor thrown by any DB execution, since none is executed at the moment when I get the message.



Ok I figured out that the error is shown when I write something to the socket. The error does not affect anything, the program continues to run. Here is the code piece were the error is shown:



void ConnectionHandler::sendBytes(QByteArray bytes) 
QMessageBox::critical(0, "test", "test");
this->socket->write(bytes);
this->socket->flush(); // after this call the error message is shown
this->socket->waitForBytesWritten();
QMessageBox::critical(0, "test2", "test2");



I checked the bytes that are supposed to be written but they look like what they are supposed to!?



Screenshot of the error:
image of the error










share|improve this question















I have a client connected to a server, and it is also connected to a Sqlite3 database. When I receive a message from the server a get an QMessageBox showing an error




"No query Unable to fetch row"




I tried it with qDebug() outputs and by Debugging the application but the message is not produced by me nor thrown by any DB execution, since none is executed at the moment when I get the message.



Ok I figured out that the error is shown when I write something to the socket. The error does not affect anything, the program continues to run. Here is the code piece were the error is shown:



void ConnectionHandler::sendBytes(QByteArray bytes) 
QMessageBox::critical(0, "test", "test");
this->socket->write(bytes);
this->socket->flush(); // after this call the error message is shown
this->socket->waitForBytesWritten();
QMessageBox::critical(0, "test2", "test2");



I checked the bytes that are supposed to be written but they look like what they are supposed to!?



Screenshot of the error:
image of the error







qt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 6:25









Cœur

17.4k9103145




17.4k9103145










asked Oct 22 '15 at 6:42









wasp256wasp256

2,16743265




2,16743265











  • Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
    – agold
    Oct 22 '15 at 7:14










  • As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
    – wasp256
    Oct 22 '15 at 7:18










  • Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
    – agold
    Oct 22 '15 at 7:20










  • I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
    – wasp256
    Oct 22 '15 at 7:26










  • But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
    – agold
    Oct 22 '15 at 13:13
















  • Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
    – agold
    Oct 22 '15 at 7:14










  • As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
    – wasp256
    Oct 22 '15 at 7:18










  • Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
    – agold
    Oct 22 '15 at 7:20










  • I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
    – wasp256
    Oct 22 '15 at 7:26










  • But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
    – agold
    Oct 22 '15 at 13:13















Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
– agold
Oct 22 '15 at 7:14




Maybe this helps you: QT5 and SQLite3 “No query Unable to fetch row”.
– agold
Oct 22 '15 at 7:14












As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
– wasp256
Oct 22 '15 at 7:18




As mentioned I get the error but there is no transaction to the database happening, no SELECT nor INSERT!?. I inserted a breakpoint in the readyRead method and before it arrives on that breakpoint I receive the error message...
– wasp256
Oct 22 '15 at 7:18












Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
– agold
Oct 22 '15 at 7:20




Can you add some code and indicate where this error happens? And did you try a really simple program to connect to the database and do the query (i.e. without any external client connections, etc.)? Just to check that part is working.
– agold
Oct 22 '15 at 7:20












I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
– wasp256
Oct 22 '15 at 7:26




I have no idea where the error comes from otherwise this post wouldn't be necessary, so posting the entire code is not possible. I have a server running to which two clients are connected. Both cleints are connected to a Sqlite DB, but not to the same. When one client sends a message to the other client through the server then the receiver shows the message before the readyRead method is even called.
– wasp256
Oct 22 '15 at 7:26












But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
– agold
Oct 22 '15 at 13:13




But where in your code is this specific message (No query Unable to fetch row) shown. The QMessageBox::critical lines in your sendBytes function obviously don't show this. The message it shows you should be sent by some function that does the query call (directly or indirectly), but this cannot be deduced from this code.
– agold
Oct 22 '15 at 13:13












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33274834%2fqt-sql-error-coming-from-nowhere-no-query-unable-to-fetch-row%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33274834%2fqt-sql-error-coming-from-nowhere-no-query-unable-to-fetch-row%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党