Hello every one.

i have a doubt , how can to insert data which is in a QList<QString> into a database.
i have created the table and the columns for it in connection.h file.. i need to insert the continuous data in the string for 500 columns with a time stamp in the end.. but it is not working what i am doing wrong here. pls help me out with it.

Qt Code:
  1. for(int p = 0; p < rdata.count();p++) // rdata is QList<QString>
  2. {
  3. lstdata = rdata.at(p); // lstdata is a QString
  4. }
  5. QString sp("INSERT INTO thdata values (%1)");
  6. sp = sp.arg(datacount)
  7. .arg("'" + lstdata + "'");
  8. m_query.exec(sp);
  9. datacount++;
  10. lstdata.clear();
To copy to clipboard, switch view to plain text mode 

thank you