Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11837

Add a hook like QSqlQuery::setUserData(const quint32 id, const QVariant& data)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 4.6.3
    • SQL Support
    • None

    Description

      It is impossible to access many of the features in the ODBC API with the current implementation, for example when using the ODBC driver and needing to set the ODBC statement attribute SQL_ATTR_CURSOR_SENSITIVITY to implement a dynaset then this is not possible.

      Considering the richness of the ODBC API, in particular control over cursor attributes, setForwardOnly() is very limiting (this is the only cursor option exposed via QSqlQuery). What's worse is that while the ODBC statement handle is available via QSqlResult::handle() the implementation of QODBC resets the statement handle prior to executing every query which makes it useless for setting attributes prior to executing a query. It is thus impossible to access many of these features in the ODBC API with the current implementation.

      While it is possible to write a custom driver, it is not possible to get this option through the QSqlQuery interface. What's needed is a hook like QSqlQuery::setUserData(const quint32 id, const QVariant& data) where the variants are simply stored in a hash and can be picked up in the driver implementation.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            naevdal Sigrid Fjell Nævdal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes