Results 1 to 16 of 16

Thread: Qt to Sqlite data insertion doubt.

Threaded View

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

    Default Re: Qt to Sqlite data insertion doubt.

    hello, yes this is what i am doing right now to insert where lstdata is QString with all the data i need to insert into the columns. but it is not working , i mean the data is not updated. I am calling this function every 2 seconds.

    Qt Code:
    1. QString sq = QString("insert into thdata values(%1);").arg(lstdata);
    2. m_query.exec(sq);
    To copy to clipboard, switch view to plain text mode 


    Added after 10 minutes:


    Hello stampede sir , Yes i am getting all the data as i expected in textBrowser.. but its not updated into the data base. . what do i have to do to insert all the data stored in a String
    id on't think this approch will work for me sir cause, i am receiving data from rs 232 terminal after aligning the data the way i wanted i am finally appending tat list into the QString lstdata; each string in the list is of 4 char's. .. I just need to insert data from the QString from first position to 500th and again start from 1st column and go on till 500th column with the time stamp.
    insert into thdata values(x,'str1','str2',...,'str500');
    since the data is appended into the string continiously , i have to insert every consequtive string into the columns from 1 to 500 and come back to 1st column and insert to 500 and so on with the time stamp. ..?! pls help me out with this problem..
    I did read about lastError() but i am using Qt integrated with Visual Studio IDE so i am not able to use QDebug here.
    thanks a lot.
    Last edited by rex; 14th December 2010 at 12:47.

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.