Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSql - save query / buffer when it fails - issue with placeholders
QtWS25 Last Chance

QSql - save query / buffer when it fails - issue with placeholders

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 347 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JulienMaille
    wrote on last edited by JulienMaille
    #1

    Dear all,
    I'm using QSql module to store measurement data in a distant database.
    I would like to handle network disconnection and buffer the queries when they fail.
    One of my ideas was to store the query in a text file and process it later when connection is restored.

    However I'm using a prepared statement and binding the values, so I need a way to get the whole query (prepared with the placeholders replaced by their bound values).

    QSqlQuery::lastQuery() and QSqlQuery::executedQuery() both give me the original prepared statement, with the placeholders. Is a way to get the sql command?

    If you have a better suggestion to buffer failed queries, let me know!
    Thank you

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved