QTBUG-18435 fix stored procedure output parameters on ODBC
authorMark Brand <mabrand@mabrand.nl>
Thu, 12 Apr 2012 20:26:08 +0000 (22:26 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 17 Apr 2012 21:16:51 +0000 (23:16 +0200)
commitf869a12c1043271b2ce8987b07a863ba3c78d6c9
tree7248ea09b3ab68372c1071f6b1cc1a1ccdb40ac9
parent84e782e2bd93f97bd1f4f46853462e794ce374b2
QTBUG-18435 fix stored procedure output parameters on ODBC

Follow-up to c55a99965d8c08d5f924d49db4fe4aa49df8096.

3 problems prevented stored procedure output parameters from working.
- SQLBindParameter needs access to buffer provided by QByteArray.
- The length of the buffer is measured in bytes.
- A typo corrupted conversion back to QString.

Also, data() makes more sense than constData() to expose the buffer.

Task-Id: QTBUG-18435
Change-Id: I66444b13c0f584ed79bcf026e5a23caff83c22cb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
src/sql/drivers/odbc/qsql_odbc.cpp
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp