Seite 1 von 1

QT4.3.1: QSqlQuery query als QString bekommen.

Verfasst: 15. August 2007 10:19
von nando
Hi,
weiss jemand, wie ich von einer QSqlQuery and die query komme, die an die DB geht ?
Also nicht lastQuery()... Sondern die eigentlich SQL Message die generiert wird...

Gruss,
Nando

Verfasst: 15. August 2007 10:32
von Sephral
Hiho,


Code: Alles auswählen

QString QSqlQuery::executedQuery () const

Returns the last query that was executed.
In most cases this function returns the same string as lastQuery(). If a prepared query with placeholders is executed on a DBMS that does not support it, the preparation of this query is emulated. The placeholders in the original query are replaced with their bound values to form a new query. This function returns the modified query. It is mostly useful for debugging purposes.
See also lastQuery().

Ciao,
Sephral

Verfasst: 15. August 2007 19:20
von nando
Klappr leider nicht.. zumindest nicht bei SQLITE...
Ich bekomme immer den string mit den bindngs...
nicht den SQL string..... :(