We have liftoff!
Both problems are resolved by modifying odbc.pro and adding the Q_ODBC_VERSION_2 define to exclude all unicode support for unix:
TARGET = qsqlodbc
HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
SOURCES = main.cpp \
../../../sql/drivers/odbc/qsql_odbc.cpp
unix {
!contains( LIBS, .*odbc.* ) {
LIBS *= $$QT_LFLAGS_ODBC
}
DEFINES += Q_ODBC_VERSION_2
}
win32 {
!win32-borland:LIBS *= -lodbc32
win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
}
include(../qsqldriverbase.pri)
TARGET = qsqlodbc
HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
SOURCES = main.cpp \
../../../sql/drivers/odbc/qsql_odbc.cpp
unix {
!contains( LIBS, .*odbc.* ) {
LIBS *= $$QT_LFLAGS_ODBC
}
DEFINES += Q_ODBC_VERSION_2
}
win32 {
!win32-borland:LIBS *= -lodbc32
win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
}
include(../qsqldriverbase.pri)
To copy to clipboard, switch view to plain text mode
The setTable call is now able to grab metadata from the table and populates all string fields correctly so QSqlTableModel and QTableView work as expected:

Also QSqlQuery no longer fails on SQLGetData and retrieves string data from select statements and store procedures as desired.
OMG I wish I would have found and tried this on Monday ... it's always something stupid and simple!
Bookmarks