Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error when creating query with QSqlQuery
Forum Updated to NodeBB v4.3 + New Features

Error when creating query with QSqlQuery

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 196 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pantoufle
    wrote on last edited by
    #1

    Hello,

    I have a problem with the following lines:

    aQuery.prepare("CREATE TABLE USER ("
                           "ID INTEGER PRIMARY KEY, "
                           "HEIGHT INTEGER, "
                           "AGE INTEGER, "
                           "TXT TEXT"
                           ")");
    if( ! aQuery.exec()) {
            return false;
    }
    

    I have the following error message :

    SQL error 1: No query Unable to fetch row

    I made some research on google, but the only solution ive seen is by completely changing the method, and on a previous project, this type of Query completely worked for me.

    Does someone have an idea on where could be the error ?

    Thanks you.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pantoufle
      wrote on last edited by
      #2

      Ive found the error litteraly 30 s after this post sorry. That was due to some mistake on my target, sorry

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Glad you found out, don't forget to mark the thread as solved using the "Topic Tools" button so other forum users may know a solution has been found :-)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved