Results 1 to 16 of 16

Thread: Qt to Sqlite data insertion doubt.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Dec 2010
    Posts
    41
    Thanks
    12

    Default Re: Qt to Sqlite data insertion doubt.

    Hello sir thanks for your time and help, This is the function i am calling every 2 seconds. The data is present in the QString just before the data insertion but its not saved into the data base.

    Qt Code:
    1. void datareceiver::aligndata()
    2. {
    3. for(int k=0; k<newdat.size(); k+=4)
    4. {
    5. nudata.append(newdat.mid(k, 4));
    6. }
    7.  
    8. for(int p = 0; p < nudata.count();p++)
    9. {
    10. lstdata = nudata.at(p);
    11. }
    12. if(lstdata!=0)
    13. {
    14. textBrowser_2->append(lstdata); \\ The data is displayed in the text browser but not in the data base.
    15. QString sq = QString("insert into thdata values(%1);").arg(lstdata);
    16. m_query.exec(sq);
    17. }
    18. }
    To copy to clipboard, switch view to plain text mode 
    the data is present in the String but its not updated into the db. what do you think can be going wrong.

    thank you
    Last edited by rex; 14th December 2010 at 11:51.

Similar Threads

  1. Replies: 13
    Last Post: 6th December 2010, 04:41
  2. Replies: 0
    Last Post: 21st April 2010, 16:25
  3. Sqlite and UTF8 data
    By kroenecker in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2009, 14:49
  4. Replies: 0
    Last Post: 4th December 2008, 05:48
  5. data not being retained in sqlite DB
    By sticcino in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2008, 10:42

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
  •  
Qt is a trademark of The Qt Company.