[Qt-interest] Qt SQL: How can I call stored procedure with IN OUT arg, Postgres DB?

Glenn Todd Miller gmiller at cfa.harvard.edu
Tue May 26 23:36:04 CEST 2009



The Qt documentation for QSqlQuery class shows an example of calling a
stored procedure as follows:

    QSqlQuery query;
    query.prepare( "call AsciiToInt(?, ?)" );
    query.bindValue( 0, "A" );
    query.bindValue( 1, 0, QSql::Out );
    query.exec();
    int i = query.boundValue( 1 ).toInt(); // i is 65.

Does anyone know if this example works with a Postgres database using
the QPSQL7 driver?  Is there any limitation or problem with using
QSql::Out or
QSql::InOut arguments?

Thanks for any pointers on this,
GTM






More information about the Qt-interest-old mailing list