I set database:
Qt Code:
QsqlDatabase db; db = QsqlDatabase::addDatabase("QSQLITE");To copy to clipboard, switch view to plain text mode
But I can not find how can I use sqlite3_busy_timeout(sqlite3*, int ms) function in Qt.
I set database:
Qt Code:
QsqlDatabase db; db = QsqlDatabase::addDatabase("QSQLITE");To copy to clipboard, switch view to plain text mode
But I can not find how can I use sqlite3_busy_timeout(sqlite3*, int ms) function in Qt.
@anda_skoa thank you for your answer but I do not undestand how can I use the function?
handle () gives me sqlite3 object but how can I use the sqlite3_busy_timeout() function?
can you give an example?
Not sure what you need an example for, the function seems to be quite simple to call
Qt Code:
if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) { // v.data() returns a pointer to the handle sqlite3 *handle = *static_cast<sqlite3 **>(v.data()); if (handle != 0) { // check that it is not NULL sqlite3_busy_timeout(handle, 100); } }To copy to clipboard, switch view to plain text mode
Cheers,
_
@anda_skoa I get it. thank you .
Bookmarks