diff options
Diffstat (limited to 'src/sql/drivers/odbc/qsql_odbc.cpp')
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 4d0f7969f..9851e1cb1 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -18,7 +18,7 @@ ** and the KDE Free TQt Foundation. ** ** Please review the following information to ensure GNU General -** Public Licensing retquirements will be met: +** Public Licensing requirements will be met: ** http://trolltech.com/products/qt/licenses/licensing/opensource/. ** If you are unsure which license is appropriate for your use, please ** review the following information: @@ -450,18 +450,18 @@ static TQSqlFieldInfo qMakeFieldInfo( const SQLHANDLE hStmt, const TQODBCPrivate bool isNull; TQString fname = qGetStringData( hStmt, 3, -1, isNull, p->unicode ); int type = qGetIntData( hStmt, 4, isNull ); // column type - int retquired = qGetIntData( hStmt, 10, isNull ); // nullable-flag - // retquired can be SQL_NO_NULLS, SQL_NULLABLE or SQL_NULLABLE_UNKNOWN - if ( retquired == SQL_NO_NULLS ) { - retquired = 1; - } else if ( retquired == SQL_NULLABLE ) { - retquired = 0; + int required = qGetIntData( hStmt, 10, isNull ); // nullable-flag + // required can be SQL_NO_NULLS, SQL_NULLABLE or SQL_NULLABLE_UNKNOWN + if ( required == SQL_NO_NULLS ) { + required = 1; + } else if ( required == SQL_NULLABLE ) { + required = 0; } else { - retquired = -1; + required = -1; } int size = qGetIntData( hStmt, 6, isNull ); // column size int prec = qGetIntData( hStmt, 8, isNull ); // precision - return TQSqlFieldInfo( fname, qDecodeODBCType( type, p ), retquired, size, prec, TQVariant(), type ); + return TQSqlFieldInfo( fname, qDecodeODBCType( type, p ), required, size, prec, TQVariant(), type ); } static TQSqlFieldInfo qMakeFieldInfo( const TQODBCPrivate* p, int i ) @@ -495,16 +495,16 @@ static TQSqlFieldInfo qMakeFieldInfo( const TQODBCPrivate* p, int i ) TQString qColName = TQString::fromLocal8Bit( (const char*)colName ); #endif // nullable can be SQL_NO_NULLS, SQL_NULLABLE or SQL_NULLABLE_UNKNOWN - int retquired = -1; + int required = -1; if ( nullable == SQL_NO_NULLS ) { - retquired = 1; + required = 1; } else if ( nullable == SQL_NULLABLE ) { - retquired = 0; + required = 0; } TQVariant::Type type = qDecodeODBCType( colType, p ); return TQSqlFieldInfo( qColName, type, - retquired, + required, (int)colSize == 0 ? -1 : (int)colSize, (int)colScale == 0 ? -1 : (int)colScale, TQVariant(), @@ -1590,7 +1590,7 @@ bool TQODBCPrivate::checkDriver() const int i; - // check the retquired functions + // check the required functions for ( i = 0; reqFunc[ i ] != 0; ++i ) { r = SQLGetFunctions( hDbc, reqFunc[ i ], &sup ); |