asked on
DEBUG 1: Project file: reading C:/Qt/2010.05/qt/src/plugins/sqldrivers/odbc/odbc
.pro
DEBUG 1: Project Parser: c:\Qt\2010.05\qt\src\plugins\sqldrivers\odbc\odbc.pro:9
: Test (first) failed.
c:\Qt\2010.05\qt\src\plugins\sqldrivers\odbc\odbc.pro:9: Parse Error ('first: al
l')
Error processing project file: odbc.pro
C:\Qt\2010.05\qt\src\plugins\sqldrivers\odbc>
cd %QTDIR%\plugins\src\sqldrivers\odbc
qmake -o Makefile odbc.pro -D [added]
nmake
QMAKESPEC=win32-g++
QTDIR=C:\Qt\2010.05\qt
QTJAVA=C:\Program Files\QuickTime\QTSystem\QTJava.zip
ASKER
/ initialize return code for sql operation status
RETCODE returnCode;
// initialize handles
SQLHENV handleEnvironment;
SQLHDBC handleConnection;
SQLHSTMT handleStatement;
// allocate environment handle
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &handleEnvironment);
// set odbc driver version for environment
SQLSetEnvAttr(handleEnvironment,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3, 0);
// allocate connection handle
SQLAllocHandle(SQL_HANDLE_DBC, handleEnvironment, &handleConnection);
// connect to database
SQLRETURN ret;
ret = SQLDriverConnect(handleConnection, NULL, (SQLWCHAR*)TEXT("DRIVER={SQL Native Client};SERVER=MyComputerName;DATABASE=MyDatabase;Trusted_Connection=yes;"), SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT);
// report status
cout << ret << "\t" << SQL_SUCCEEDED(ret) << endl;
if (SQL_SUCCEEDED(ret)) cout << "Connected" << endl;
else cout << "Connection failed" << endl;
ASKER
ASKER
Microsoft Windows XP is the sixth release of the NT series of operating systems, and was the first to be marketed in a variety of editions: XP Home and XP Professional, designed for business and power users. The advanced features in XP Professional are generally disabled in Home Edition, but are there and can be activated. There were two 64-bit editions, an embedded edition and a tablet edition.
TRUSTED BY
ASKER
I downloaded the pricey commercial version and ODBC works as published. But save for the hefty price tag, am looking for options to implement ODBC with QT.
Using the commercial version, I managed to complete roughly 40% of the ODBC engine for the app. Having an ODBC alternative at hand I would consider a purchase depending on the cost.
Many thanks!