Results 1 to 4 of 4

Thread: Problem in executing SqLite Query in C++ project

  1. #1
    Join Date
    Jun 2019
    Posts
    5
    Thanks
    1
    Qt products
    Qt5

    Default Problem in executing SqLite Query in C++ project

    Hello,
    I am trying to connect to database SBS.sqlite using QT.
    I sucessfully connect my database but I couldn't execute query.

    I have attatched mainwindow.cpp and mainwindow.h with this thread.
    The problem I mentioned is invoid MainWindow::on_registerButton_2_clicked() function.
    Attached Files Attached Files
    Last edited by RamrajCh; 29th June 2019 at 05:18.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    443
    Thanked 60 Times in 56 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem in executing SqLite Query in C++ project

    Firstz make sure that the table really exists, and then you should also bind the values you want to store in the db

  3. #3
    Join Date
    Jun 2019
    Posts
    5
    Thanks
    1
    Qt products
    Qt5

    Default Re: Problem in executing SqLite Query in C++ project

    Now,I have done it. But the problem is same. It would not execute query.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    443
    Thanked 60 Times in 56 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem in executing SqLite Query in C++ project

    Then you should take a look at QSqlQuery::lastError() after preparing and executing your query.

Similar Threads

  1. QT SQLITE Query
    By andrewhopps in forum Newbie
    Replies: 1
    Last Post: 15th May 2015, 01:50
  2. QSqlQuery update query not working using SQLite
    By Cyrebo in forum Qt Programming
    Replies: 2
    Last Post: 29th March 2013, 00:33
  3. SQLITE - UPDATE query problem
    By Tomasz in forum Newbie
    Replies: 12
    Last Post: 5th September 2010, 20:27
  4. Problem with A SQLite Query
    By maveric in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2008, 11:15
  5. [QT4][SQLITE] Database and query
    By agent007se in forum Newbie
    Replies: 10
    Last Post: 12th July 2006, 22:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.