SHARE
TWEET

Untitled

a guest Mar 26th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void DataBaseManager::insertData(UdpPacket &packet)
  2. {
  3. //QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL"); это пояснение, чтобы было понятно, что такое db
  4. QString queryString = "INSERT INTO public.counts(timestamp_uts, chanel_id, sensor_id, value) "
  5.                                            "VALUES(123465789, 9876, 444, 777);";
  6. QSqlQuery query(db);
  7. query.prepare(queryString);
  8. query.exec();
  9. query.finish();
  10. //query.clear();
  11. return;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top