[Interest] transaction modes in QtSql

alexander golks alex at golks.de
Tue Apr 14 11:14:01 CEST 2020


Am Tue, 14 Apr 2020 09:01:19 +0000
schrieb Hamish Moffatt <hamish at risingsoftware.com>:

> Some database engines allow you to set properties of a database 
> transaction, like read only versus read/write, isolation level etc.
> 
> It looks like in Postgres you would use an SQL command line like 'start 
> transaction isolation level repeatable read;'. In Firebird/Interbase, 
> you have to parse some extra parameters to the transaction API (not 
> plain text).
> 
> I don't see any way to access this functionality from Qt though. Am I 
> missing something?

Not sure if it's what you ask, but you cannot use straight sql e.g. via QSqlDatabase::exec
  db->exec("SET TRANSACTION ISOLATION LEVEL READ COMMITTED;");
for ms sql server?

alex

-- 
/*
 *  /* if it speaks printer language, it's
 *   * probably a printer *\/
 *    linux-2.6.19/drivers/parport/probe.c
 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200414/a8585f51/attachment.sig>


More information about the Interest mailing list