From: pharvey Date: December 28 2005 7:30am Subject: Connector/ODBC 5 commit: r19 - / MYODBCC MYODBCC/MYODBCCLib MYODBCC/include MYODBCDbg/MYODBCDbgLib MYODBCDbg/MYODBCDbgTest MYODBCDbg/include MYODBCIns/MYODBCInsLib MYODBCIns/MYODBCInsTest MYODBCIns/include MYODBCTst MYODBCTst/MYODBCTstLib MYODBCTst/include List-Archive: http://lists.mysql.com/commits/436 Message-Id: <200512280730.jBS7UBfv019775@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: CreateMakefiles.bat CreateVisualStudioProjects.bat MYODBCC/CMakeLists.txt MYODBCC/MYODBCC.pro MYODBCC/MYODBCCLib/CMakeLists.txt MYODBCC/include/MYODBCC.h MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp MYODBCDbg/MYODBCDbgTest/MYODBCDbgTest.cpp MYODBCDbg/include/MYODBCDbg.h MYODBCIns/MYODBCInsLib/MYODBCIns.cpp MYODBCIns/MYODBCInsLib/MYODBCInsDataSource.cpp MYODBCIns/MYODBCInsLib/MYODBCInsDriver.cpp MYODBCIns/MYODBCInsLib/MYODBCInsDriverConnect.cpp MYODBCIns/MYODBCInsLib/MYODBCInsLib.pro MYODBCIns/MYODBCInsTest/MYODBCInsTest.cpp MYODBCIns/MYODBCInsTest/MYODBCInsTest.pro MYODBCIns/include/MYODBCIns.h MYODBCIns/include/MYODBCInsDataSource.h MYODBCIns/include/MYODBCInsDriver.h MYODBCTst/MYODBCTst.vpj MYODBCTst/MYODBCTstLib/MYODBCTstAllocHandle.c MYODBCTst/MYODBCTstLib/MYODBCTstCloseCursor.c MYODBCTst/MYODBCTstLib/MYODBCTstColumns.c MYODBCTst/MYODBCTstLib/MYODBCTstConnect.c MYODBCTst/MYODBCTstLib/MYODBCTstDisconnect.c MYODBCTst/MYODBCTstLib/MYODBCTstDriverConnect.c MYODBCTst/MYODBCTstLib/MYODBCTstDump.c MYODBCTst/MYODBCTstLib/MYODBCTstExecDirect.c MYODBCTst/MYODBCTstLib/MYODBCTstExecute.c MYODBCTst/MYODBCTstLib/MYODBCTstFetch.c MYODBCTst/MYODBCTstLib/MYODBCTstForeignKeys.c MYODBCTst/MYODBCTstLib/MYODBCTstFreeHandle.c MYODBCTst/MYODBCTstLib/MYODBCTstGetData.c MYODBCTst/MYODBCTstLib/MYODBCTstGetTypeInfo.c MYODBCTst/MYODBCTstLib/MYODBCTstNumResultCols.c MYODBCTst/MYODBCTstLib/MYODBCTstPrepare.c MYODBCTst/MYODBCTstLib/MYODBCTstPrimaryKeys.c MYODBCTst/MYODBCTstLib/MYODBCTstPrintDiagnostics.c MYODBCTst/MYODBCTstLib/MYODBCTstSetEnvAttr.c MYODBCTst/MYODBCTstLib/MYODBCTstStatistics.c MYODBCTst/MYODBCTstLib/MYODBCTstTables.c MYODBCTst/include/MYODBCTst.h defines.pri doxygen.config Log: UNICODE: - more porting issues (linux to XP) - more of those incremental enhancements (MYODBCDbg & MYODBCIns) - a bit more work needed to get MYODBCIns to pass post-build tests Modified: CreateMakefiles.bat =================================================================== --- CreateMakefiles.bat 2005-12-27 20:07:41 UTC (rev 18) +++ CreateMakefiles.bat 2005-12-28 07:30:09 UTC (rev 19) @@ -33,23 +33,13 @@ ECHO MYODBCDbg... cd ..\..\MYODBCDbg\MYODBCDbgLib qmake +cd ..\MYODBCDbgTest +qmake ECHO MYODBCTst... cd ..\..\MYODBCTst\MYODBCTstLib qmake -ECHO MYODBCArray... -cd ..\..\MYODBCArray\MYODBCArrayLib -qmake -cd ..\MYODBCArrayTest -qmake - -ECHO MYODBCList... -cd ..\..\MYODBCList\MYODBCListLib -qmake -cd ..\MYODBCListTest -qmake - ECHO MYODBCIns... cd ..\..\MYODBCIns\MYODBCInsLib qmake Modified: CreateVisualStudioProjects.bat =================================================================== --- CreateVisualStudioProjects.bat 2005-12-27 20:07:41 UTC (rev 18) +++ CreateVisualStudioProjects.bat 2005-12-28 07:30:09 UTC (rev 19) @@ -22,7 +22,7 @@ ECHO Creating Visual Studio project files... ECHO MYODBCC... -cd MYODBCC\MYODBCCLib +cd MYODBCC\Lib qmake -t vclib cd ..\MYODBCCTest qmake -t vcapp Modified: MYODBCC/CMakeLists.txt =================================================================== --- MYODBCC/CMakeLists.txt 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCC/CMakeLists.txt 2005-12-28 07:30:09 UTC (rev 19) @@ -1,3 +1,3 @@ PROJECT( MYODBCC ) -ADD_SUBDIRECTORY( MYODBCCLib ) +ADD_SUBDIRECTORY( Lib ) ADD_SUBDIRECTORY( MYODBCCTest ) Modified: MYODBCC/MYODBCC.pro =================================================================== --- MYODBCC/MYODBCC.pro 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCC/MYODBCC.pro 2005-12-28 07:30:09 UTC (rev 19) @@ -1,5 +1,5 @@ TEMPLATE = subdirs SUBDIRS = \ - MYODBCCLib \ + Lib \ MYODBCCTest Modified: MYODBCC/MYODBCCLib/CMakeLists.txt =================================================================== --- MYODBCC/MYODBCCLib/CMakeLists.txt 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCC/MYODBCCLib/CMakeLists.txt 2005-12-28 07:30:09 UTC (rev 19) @@ -1,4 +1,4 @@ -PROJECT( MYODBCCLib ) +PROJECT( Lib ) ADD_LIBRARY( MYODBCC STATIC ../include/MYODBCC.h MYODBCCInternal.h Modified: MYODBCC/include/MYODBCC.h =================================================================== --- MYODBCC/include/MYODBCC.h 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCC/include/MYODBCC.h 2005-12-28 07:30:09 UTC (rev 19) @@ -152,7 +152,6 @@ /* unicode aware (or not) */ #ifdef WIN32 - #define MYODBCCL _T #define MYODBCCfprintf _ftprintf_s #define MYODBCCstrlen wcslen #else @@ -461,7 +460,7 @@ */ #define MYODBCCAssert(a1)\ {\ - MYODBCCfprintf( stderr, MYODBCCL("[ASSERT][%s][%d] %s\n"), __FILE__, __LINE__, a1 );\ + MYODBCCfprintf( stderr, L"[ASSERT][%s][%d] %s\n", __FILE__, __LINE__, a1 );\ exit( 1 );\ } @@ -482,13 +481,13 @@ (LPTSTR)&pszError,\ 0,\ NULL );\ - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d] %d: %s\n"), __FILE__, __LINE__, nError, pszError );\ + MYODBCCfprintf( stderr, L"[%s][%d] %d: %s\n", __FILE__, __LINE__, nError, pszError );\ LocalFree( pszError );\ } #else #define MYODBCCPrintLastError()\ {\ - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d] %d: %s\n"), __FILE__, __LINE__, xxxx, xxxx );\ + MYODBCCfprintf( stderr, L"[%s][%d] %d: %s\n", __FILE__, __LINE__, xxxx, xxxx );\ } #endif Modified: MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp =================================================================== --- MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCDbg/MYODBCDbgLib/MYODBCDbg.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -71,10 +71,10 @@ */ void MYODBCDbg::doEnter( const char *pszFile, int nLine, const char *pszFunction ) { - QString stringMessage; - - stringMessage.sprintf( "%s:%d: %s\n\t[ENTER ] ", pszFile, nLine, pszFunction ); - *this << stringMessage << endl; + *this << QString( "%1:%2: %3\n\t[ENTER ] " ) + .arg( pszFile ) + .arg( nLine ) + .arg( pszFunction ) << endl; } /*! @@ -94,11 +94,11 @@ */ SQLRETURN MYODBCDbg::doReturn( const char *pszFile, int nLine, const char *pszFunction, SQLRETURN nReturn ) { - QString stringMessage; + *this << QString( "%1:%2: %3\n\t[RETURN ] " ) + .arg( pszFile ) + .arg( nLine ) + .arg( pszFunction ) << getReturnString( nReturn ) << endl; - stringMessage.sprintf( "%s:%d: %s\n\t[RETURN ] ", pszFile, nLine, pszFunction ); - *this << stringMessage << getReturnString( nReturn ) << endl; - return nReturn; } Modified: MYODBCDbg/MYODBCDbgTest/MYODBCDbgTest.cpp =================================================================== --- MYODBCDbg/MYODBCDbgTest/MYODBCDbgTest.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCDbg/MYODBCDbgTest/MYODBCDbgTest.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -35,33 +35,61 @@ int (*pfunc)(); } TEST; -/* MYODBCDbg */ +QString stringOutput; +QString stringOutputExpected =\ +" [ENTER ] \n\ +.\\MYODBCDbgTest.cpp:61: test1\n\ + [INFO ] \n\ +.\\MYODBCDbgTest.cpp:62: test1\n\ + [INFO ] Got here\n\ +.\\MYODBCDbgTest.cpp:63: test1\n\ + [INFO ] gpMYODBCDbg = 55\n\ +.\\MYODBCDbgTest.cpp:64: test1\n\ + [ERROR ] Ooops\n\ +.\\MYODBCDbgTest.cpp:65: test1\n\ + [WARNING] That smarts\n\ +.\\MYODBCDbgTest.cpp:67: test1\n\ + [RETURN ] SQL_SUCCESS\n"; + +/* create some output */ int test1() { + int n = 55; MYODBCDbgEnter(); MYODBCDbgPrint( "" ); MYODBCDbgPrint( "Got here" ); - MYODBCDbgPrint2( "gpMYODBCDbg = %p", gpMYODBCDbg ) + MYODBCDbgPrint2( "gpMYODBCDbg = %d", n ) MYODBCDbgError( "Ooops" ); MYODBCDbgWarning( "That smarts"); MYODBCDbgReturn( SQL_SUCCESS ); } +/* verify output */ +int test2() +{ + if ( stringOutput != stringOutputExpected ) + return SQL_ERROR; + + return SQL_SUCCESS; +} + /* \todo The main thing here is that we build and execute ok - but in future read output file to ensure that it is what we expect */ int main() { - TEST tests[2]= + TEST tests[3]= { - {"MYODBCDbg", test1}, + {"test1", test1}, + {"test2", test2}, {NULL, NULL} }; int n; int nReturn = 0; - gpMYODBCDbg = new MYODBCDbg( stderr ); +// MYODBCDbgInit( stdout ); + MYODBCDbgInit( &stringOutput ); for ( n = 0; tests[n].name; n++ ) { @@ -77,8 +105,7 @@ } testExit1: - delete gpMYODBCDbg; - gpMYODBCDbg = NULL; + MYODBCDbgFini(); return nReturn; } Modified: MYODBCDbg/include/MYODBCDbg.h =================================================================== --- MYODBCDbg/include/MYODBCDbg.h 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCDbg/include/MYODBCDbg.h 2005-12-28 07:30:09 UTC (rev 19) @@ -81,6 +81,22 @@ */ #if MYODBC_DBG > 0 +#define MYODBCDbgInit(A)\ +{\ +if ( gpMYODBCDbg )\ + delete gpMYODBCDbg;\ +gpMYODBCDbg = new MYODBCDbg( A );\ +} + +#define MYODBCDbgFini()\ +{\ +if ( gpMYODBCDbg )\ +{\ + delete gpMYODBCDbg;\ + gpMYODBCDbg = NULL;\ +}\ +} + /*! \brief Provides debug info indicating function entry. @@ -162,6 +178,8 @@ #define MYODBCDbgReturn(A) return(gpMYODBCDbg ? gpMYODBCDbg->doReturn( __FILE__, __LINE__, __FUNCTION__, A ) : A) #else +#define MYODBCDbgInit(A) {} +#define MYODBCDbgFini() {} #define MYODBCDbgEnter() {} #define MYODBCDbgPrint(A) {} #define MYODBCDbgPrint2(A,B) {} Modified: MYODBCIns/MYODBCInsLib/MYODBCIns.cpp =================================================================== --- MYODBCIns/MYODBCInsLib/MYODBCIns.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsLib/MYODBCIns.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -28,5 +28,211 @@ */ #include "MYODBCInsInternal.h" +RETCODE MYODBCIns::setError( const QString &stringMessage, DWORD nErrorCode ) +{ + return SQLPostInstallerError( nErrorCode, stringMessage.utf16() ); +} +/*! + \internal + \brief Get a list of installed drivers. + + \note XP + + SQLGetPrivateProfileString() with a NULL 1st arg does + not return anything - ever. To return a list of drivers + we can use SQLGetInstalledDrivers() instead. + + \param + + \returns +*/ +QStringList MYODBCIns::getDriverNames() +{ + SQLWCHAR szBuffer[50000]; + int nChars = 0; + int nChar = 0; + QStringList stringlistFriendlyNames; + QString stringFriendlyName = QString::null; + + nChars = ( SQLGetInstalledDrivers( szBuffer, sizeof(szBuffer) / sizeof(SQLWCHAR), NULL ) ? 1 : 0 ); + if ( nChars < 1 ) + { + MYODBCCfprintf( stderr, L"[%s][%d][INFO] Call returned no data. Could be an error or just no data to return.\n", __FILE__, __LINE__ ); + return stringlistFriendlyNames; + } + + /*! \warning assumes that we are *not* using wide char :o */ + for ( nChar = 0; nChar < nChars; nChar++ ) + { + if ( szBuffer[nChar] ) + { + stringFriendlyName += szBuffer[nChar]; + } + else + { + if ( !stringFriendlyName.isEmpty() ) + stringlistFriendlyNames += stringFriendlyName; + stringFriendlyName = QString::null; + /* check for end (double null) in case nChars is invalid */ + if ( !szBuffer[nChar+1] ) + break; + } + } + + return stringlistFriendlyNames; +} + +QStringList MYODBCIns::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE nScope ) +{ + SQLWCHAR szBuffer[50000]; + int nChars = 0; + int nChar = 0; + QStringList stringlistFriendlyNames; + QString stringFriendlyName = QString::null; + UWORD nScopeToRestore = ODBC_BOTH_DSN; + + if ( !SQLGetConfigMode( &nScopeToRestore ) ) + return stringlistFriendlyNames; + + SQLSetConfigMode( (UWORD)nScope ); + + nChars = SQLGetPrivateProfileString( NULL, NULL, L"", szBuffer, sizeof(szBuffer) / sizeof(SQLWCHAR), L"ODBC.INI" ); + if ( nChars < 1 ) + goto getDataSourceNamesExit1; + + /*! \warning assumes that we are *not* using wide char :o */ + for ( nChar = 0; nChar < nChars; nChar++ ) + { + if ( szBuffer[nChar] ) + { + stringFriendlyName += szBuffer[nChar]; + } + else + { + if ( !stringFriendlyName.isEmpty() ) + stringlistFriendlyNames += stringFriendlyName; + stringFriendlyName = QString::null; + /* check for end (double null) in case nChars is invalid */ + if ( !szBuffer[nChar+1] ) + break; + } + } + +getDataSourceNamesExit1: + SQLSetConfigMode( nScopeToRestore ); + + return stringlistFriendlyNames; +} + +RETCODE MYODBCIns::getError( WORD nError, DWORD *pnErrorCode, QString &stringMessage ) +{ + SQLWCHAR szMessage[32000]; + WORD nMessageLen; + + RETCODE nRetCode = SQLInstallerError( nError, pnErrorCode, szMessage, sizeof(szMessage) / sizeof(SQLWCHAR), &nMessageLen ); + + if ( SQL_SUCCEEDED(nRetCode) ) + stringMessage = QString::fromStdWString( szMessage ); + + return nRetCode; +} + +QString MYODBCIns::getError( WORD nError ) +{ + DWORD nErrorCode = 0; + QString stringMessage; + QString stringMessageEnhanced; + RETCODE nRetCode = getError( nError, &nErrorCode, stringMessage ); + + if ( SQL_SUCCEEDED(nRetCode) ) + stringMessageEnhanced = QString( "%1 (%2)" ) + .arg( nErrorCode ) + .arg( stringMessage ); + + return stringMessageEnhanced; +} + +QStringList MYODBCIns::getErrors() +{ + QStringList stringlistErrors; + + /* 8 because this is max according to MS ver of ODBC spec */ + for ( WORD nError = 1; nError <= 8; nError++ ) + { + QString stringError = getError( nError ); + if ( stringError.isEmpty() ) + break; + stringlistErrors += stringError; + } + + return stringlistErrors; +} + +bool MYODBCIns::isExistsDataSourceName( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ) +{ + SQLWCHAR szSectionNames[SQL_MAX_DSN_LENGTH * MYODBC_INS_MAX_DSN_NAMES]; + SQLWCHAR * pszSectionName; + bool bReturn = false; + UWORD nScopeToRestore = ODBC_BOTH_DSN; + + if ( !SQLGetConfigMode( &nScopeToRestore ) ) + return bReturn; + + if ( stringDataSourceName.isEmpty() ) + return bReturn; + + SQLSetConfigMode( (UWORD)nScope ); + + /*! + Get all section names. It would seem to be safest to get all sections + names and then scan the result for match rather than try to do this + with a single call to SQLGetPrivateProfileString() in off-chance that + the section name exists with no name/value pairs. + */ + +#if defined(WIN32) + /*! + \note WIN + + SQLGetPrivateProfileString does not work when NULL for first arg. + so we provide first arg and hope that there is at least one + attribute (its likley anyway). + */ + if ( SQLGetPrivateProfileString( stringDataSourceName.utf16(), NULL, L"", szSectionNames, sizeof(szSectionNames) / sizeof(SQLWCHAR), L"ODBC.INI" ) > 0 ) + { + bReturn = true; + goto isExistsDataSourceNameExit1; + } + else + goto isExistsDataSourceNameExit1; +#else + if ( SQLGetPrivateProfileString( NULL, NULL, L"", szSectionNames, sizeof( szSectionNames ) / sizeof(SQLWCHAR), L"ODBC.INI" ) < 1 ) + goto isExistsDataSourceNameExit1; +#endif + /*! + Scan result and return MYODBC_C_TRUE if we find a match. + */ + pszSectionName = szSectionNames; + while( *pszSectionName ) + { + QString stringSectionName( QString::fromStdWString( pszSectionName ) ); + + if ( QString::localeAwareCompare( stringSectionName.toUpper(), stringDataSourceName.toUpper() ) == 0 ) + { + bReturn = true; + goto isExistsDataSourceNameExit1; + } + pszSectionName += MYODBCCstrlen( pszSectionName ) + 1; + } + +isExistsDataSourceNameExit1: + SQLSetConfigMode( nScopeToRestore ); + + return bReturn; +} + + + + Modified: MYODBCIns/MYODBCInsLib/MYODBCInsDataSource.cpp =================================================================== --- MYODBCIns/MYODBCInsLib/MYODBCInsDataSource.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsLib/MYODBCInsDataSource.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -28,7 +28,7 @@ */ #include "MYODBCInsInternal.h" -#define MYODBC_INS_ODBCINI_HEADER_SECTION (LPWSTR)MYODBCCL("ODBC Data Sources") +#define MYODBC_INS_ODBCINI_HEADER_SECTION L"ODBC Data Sources" MYODBCInsDataSource::MYODBCInsDataSource( MYODBC_INS_DATASOURCE_MODE nMode ) { @@ -194,111 +194,6 @@ return nScope; } -QStringList MYODBCInsDataSource::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE nScope ) -{ - SQLWCHAR szBuffer[50000]; - int nChars = 0; - int nChar = 0; - QStringList stringlistFriendlyNames; - QString stringFriendlyName = QString::null; - UWORD nScopeToRestore = ODBC_BOTH_DSN; - - if ( !SQLGetConfigMode( &nScopeToRestore ) ) - return stringlistFriendlyNames; - - SQLSetConfigMode( (UWORD)nScope ); - - nChars = SQLGetPrivateProfileString( NULL, NULL, (LPWSTR)MYODBCCL(""), szBuffer, sizeof(szBuffer) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ); - if ( nChars < 1 ) - goto getDataSourceNamesExit1; - - /*! \warning assumes that we are *not* using wide char :o */ - for ( nChar = 0; nChar < nChars; nChar++ ) - { - if ( szBuffer[nChar] ) - { - stringFriendlyName += szBuffer[nChar]; - } - else - { - if ( !stringFriendlyName.isEmpty() ) - stringlistFriendlyNames += stringFriendlyName; - stringFriendlyName = QString::null; - /* check for end (double null) in case nChars is invalid */ - if ( !szBuffer[nChar+1] ) - break; - } - } - -getDataSourceNamesExit1: - SQLSetConfigMode( nScopeToRestore ); - - return stringlistFriendlyNames; -} - -bool MYODBCInsDataSource::isExistsDataSourceName( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ) -{ - SQLWCHAR szSectionNames[SQL_MAX_DSN_LENGTH * MYODBC_INS_MAX_DSN_NAMES]; - SQLWCHAR * pszSectionName; - bool bReturn = false; - UWORD nScopeToRestore = ODBC_BOTH_DSN; - - if ( !SQLGetConfigMode( &nScopeToRestore ) ) - return bReturn; - - if ( stringDataSourceName.isEmpty() ) - return bReturn; - - SQLSetConfigMode( (UWORD)nScope ); - - /*! - Get all section names. It would seem to be safest to get all sections - names and then scan the result for match rather than try to do this - with a single call to SQLGetPrivateProfileString() in off-chance that - the section name exists with no name/value pairs. - */ - -#if defined(WIN32) - /*! - \note WIN - - SQLGetPrivateProfileString does not work when NULL for first arg. - so we provide first arg and hope that there is at least one - attribute (its likley anyway). - */ - if ( SQLGetPrivateProfileString( stringDataSourceName.toStdWString().data(), NULL, (LPWSTR)MYODBCCL(""), szSectionNames, sizeof(szSectionNames) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) > 0 ) - { - bReturn = true; - goto isExistsDataSourceNameExit1; - } - else - goto isExistsDataSourceNameExit1; -#else - if ( SQLGetPrivateProfileString( NULL, NULL, (LPWSTR)MYODBCCL(""), szSectionNames, sizeof( szSectionNames ) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) < 1 ) - goto isExistsDataSourceNameExit1; -#endif - /*! - Scan result and return MYODBC_C_TRUE if we find a match. - */ - pszSectionName = szSectionNames; - while( *pszSectionName ) - { - QString stringSectionName( QString::fromStdWString( pszSectionName ) ); - - if ( QString::localeAwareCompare( stringSectionName.toUpper(), stringDataSourceName.toUpper() ) == 0 ) - { - bReturn = true; - goto isExistsDataSourceNameExit1; - } - pszSectionName += MYODBCCstrlen( pszSectionName ) + 1; - } - -isExistsDataSourceNameExit1: - SQLSetConfigMode( nScopeToRestore ); - - return bReturn; -} - bool MYODBCInsDataSource::doRead( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ) { SQLWCHAR szEntryNames[SQL_MAX_DSN_LENGTH * MYODBC_INS_MAX_DSN_NAMES]; @@ -317,7 +212,7 @@ SQLSetConfigMode( (UWORD)nScope ); *szEntryNames = '\0'; - if ( ( nChars = SQLGetPrivateProfileString( stringDataSourceName.toStdWString().data(), NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) ) < 1 ) + if ( ( nChars = SQLGetPrivateProfileString( stringDataSourceName.utf16(), NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), L"ODBC.INI" ) ) < 1 ) goto doReadExit1; #if defined(WIN32) @@ -342,7 +237,7 @@ *szEntryNames = '\0'; SQLSetConfigMode( ODBC_SYSTEM_DSN ); - if ( ( nChars = SQLGetPrivateProfileString( stringDataSourceName.toStdWString().data(), NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) ) < 1 ) + if ( ( nChars = SQLGetPrivateProfileString( stringDataSourceName.utf16(), NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), L"ODBC.INI" ) ) < 1 ) goto doReadExit1; } } @@ -361,9 +256,9 @@ { *szValue = '\0'; #if defined(WIN32) - if ( SQLGetPrivateProfileString( stringDataSourceName.toStdWString().data(), pszEntryName, NULL, szValue, sizeof( szValue ) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) > 0 ) + if ( SQLGetPrivateProfileString( stringDataSourceName.utf16(), pszEntryName, NULL, szValue, sizeof( szValue ) / sizeof(SQLWCHAR), L"ODBC.INI" ) > 0 ) #else - if ( SQLGetPrivateProfileString( stringDataSourceName.toStdWString().data(), pszEntryName, (LPWSTR)MYODBCCL(""), szValue, sizeof( szValue ) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) > 0 ) + if ( SQLGetPrivateProfileString( stringDataSourceName.utf16(), pszEntryName, L"", szValue, sizeof( szValue ) / sizeof(SQLWCHAR), L"ODBC.INI" ) > 0 ) #endif { QString stringEntryName( QString::fromStdWString( pszEntryName ) ); @@ -446,11 +341,11 @@ else { /* What the ? */ - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d][ERROR] Unknown attribute (%s).\n"), __FILE__, __LINE__, pszEntryName ); + MYODBCCfprintf( stderr, L"[%s][%d][ERROR] Unknown attribute (%s).\n", __FILE__, __LINE__, pszEntryName ); } } else - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d][WARNING] Failed to get value for attribute (%s).\n"), __FILE__, __LINE__, pszEntryName ); + MYODBCCfprintf( stderr, L"[%s][%d][WARNING] Failed to get value for attribute (%s).\n", __FILE__, __LINE__, pszEntryName ); pszEntryName += MYODBCCstrlen( pszEntryName ) + 1; } /* while */ @@ -459,7 +354,7 @@ /* try harder to get the friendly driver name */ if ( stringDRIVER.isEmpty() ) { - if ( SQLGetPrivateProfileString( MYODBC_INS_ODBCINI_HEADER_SECTION, NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) < 1 ) + if ( SQLGetPrivateProfileString( MYODBC_INS_ODBCINI_HEADER_SECTION, NULL, NULL, szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), L"ODBC.INI" ) < 1 ) goto doReadExit1; pszEntryName = szEntryNames; @@ -467,7 +362,7 @@ { QString stringEntryName( QString::fromStdWString( pszEntryName ) ); *szValue = '\0'; - if ( SQLGetPrivateProfileString( MYODBC_INS_ODBCINI_HEADER_SECTION, pszEntryName, NULL, szValue, sizeof(szValue) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBC.INI") ) > 0 ) + if ( SQLGetPrivateProfileString( MYODBC_INS_ODBCINI_HEADER_SECTION, pszEntryName, NULL, szValue, sizeof(szValue) / sizeof(SQLWCHAR), L"ODBC.INI" ) > 0 ) { if ( QString::localeAwareCompare( stringEntryName.toUpper(), stringDataSourceName.toUpper() ) == 0 ) @@ -523,40 +418,40 @@ So we ensure that any existing DSN with same name is removed with the following call. */ - if ( !SQLRemoveDSNFromIni( stringDSN.toStdWString().data() ) ) + if ( !SQLRemoveDSNFromIni( stringDSN.utf16() ) ) goto doReadExit1; /* create/replace data source name */ - if ( !SQLWriteDSNToIni( stringDSN.toStdWString().data(), stringDRIVER.toStdWString().data() ) ) + if ( !SQLWriteDSNToIni( stringDSN.utf16(), stringDRIVER.utf16() ) ) goto doReadExit1; /* add details */ if ( !stringDATABASE.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("DATABASE"), stringDATABASE.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"DATABASE", stringDATABASE.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringDESCRIPTION.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("DESCRIPTION"), stringDESCRIPTION.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"DESCRIPTION", stringDESCRIPTION.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringOPTION.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("OPTION"), stringOPTION.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"OPTION", stringOPTION.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringPASSWORD.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("PWD"), stringPASSWORD.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"PWD", stringPASSWORD.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringPORT.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("PORT"), stringPORT.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"PORT", stringPORT.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringSERVER.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("SERVER"), stringSERVER.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"SERVER", stringSERVER.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringSOCKET.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("SOCKET"), stringSOCKET.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"SOCKET", stringSOCKET.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringSTMT.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("STMT"), stringSTMT.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"STMT", stringSTMT.utf16(), L"odbc.ini" ) ) goto doReadExit1; if ( !stringUSER.isNull() && - !SQLWritePrivateProfileString( stringDSN.toStdWString().data(), (LPWSTR)MYODBCCL("UID"), stringUSER.toStdWString().data(), (LPWSTR)MYODBCCL("odbc.ini") ) ) + !SQLWritePrivateProfileString( stringDSN.utf16(), L"UID", stringUSER.utf16(), L"odbc.ini" ) ) goto doReadExit1; bReturn = true; @@ -591,7 +486,7 @@ bool MYODBCInsDataSource::doDelete( const QString &stringDataSourceName ) { - return SQLRemoveDSNFromIni( stringDataSourceName.toStdWString().data() ); + return SQLRemoveDSNFromIni( stringDataSourceName.utf16() ); } MYODBCInsDataSource MYODBCInsDataSource::operator=( MYODBCInsDataSource rval ) Modified: MYODBCIns/MYODBCInsLib/MYODBCInsDriver.cpp =================================================================== --- MYODBCIns/MYODBCInsLib/MYODBCInsDriver.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsLib/MYODBCInsDriver.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -62,56 +62,6 @@ return stringSETUP; } -/*! - \internal - \brief Get a list of installed drivers. - - \note XP - - SQLGetPrivateProfileString() with a NULL 1st arg does - not return anything - ever. To return a list of drivers - we can use SQLGetInstalledDrivers() instead. - - \param - - \returns -*/ -QStringList MYODBCInsDriver::getDriverNames() -{ - SQLWCHAR szBuffer[50000]; - int nChars = 0; - int nChar = 0; - QStringList stringlistFriendlyNames; - QString stringFriendlyName = QString::null; - - nChars = ( SQLGetInstalledDrivers( szBuffer, sizeof(szBuffer) / sizeof(SQLWCHAR), NULL ) ? 1 : 0 ); - if ( nChars < 1 ) - { - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d][INFO] Call returned no data. Could be an error or just no data to return.\n"), __FILE__, __LINE__ ); - return stringlistFriendlyNames; - } - - /*! \warning assumes that we are *not* using wide char :o */ - for ( nChar = 0; nChar < nChars; nChar++ ) - { - if ( szBuffer[nChar] ) - { - stringFriendlyName += szBuffer[nChar]; - } - else - { - if ( !stringFriendlyName.isEmpty() ) - stringlistFriendlyNames += stringFriendlyName; - stringFriendlyName = QString::null; - /* check for end (double null) in case nChars is invalid */ - if ( !szBuffer[nChar+1] ) - break; - } - } - - return stringlistFriendlyNames; -} - bool MYODBCInsDriver::doRead( const QString &stringFriendlyName ) { SQLWCHAR szEntryNames[SQL_MAX_DSN_LENGTH * MYODBC_INS_MAX_DSN_NAMES]; @@ -119,12 +69,21 @@ SQLWCHAR szValue[4096]; if ( stringFriendlyName.isEmpty() ) + { + MYODBCIns::setError( "invalid data source name" ); return false; + } - if ( SQLGetPrivateProfileString( stringFriendlyName.toStdWString().data(), NULL, (LPWSTR)MYODBCCL(""), szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBCINST.INI") ) < 1 ) + *szEntryNames = '\0'; + int nChars = SQLGetPrivateProfileString( stringFriendlyName.utf16(), NULL, L"", szEntryNames, sizeof(szEntryNames) / sizeof(SQLWCHAR), L"ODBCINST.INI" ); + if ( nChars < 1 ) + { + if ( MYODBCIns::setError( "data source name not found" ) != SQL_SUCCESS ) + MYODBCCfprintf( stderr, L"[PAH][%s][%d]\n", __FILE__, __LINE__ ); return false; + } - /* we do not do a doClear() here because we want to 'merge' the data - not replace it */ + /* we avoid a doClear() here because we want to 'merge' the data - not replace it */ /* commit ourselves to getting the data */ this->stringFriendlyName = stringFriendlyName; @@ -136,7 +95,7 @@ while ( *pszEntryName ) { *szValue = '\0'; - if ( SQLGetPrivateProfileString( stringFriendlyName.toStdWString().data(), pszEntryName, (LPWSTR)MYODBCCL(""), szValue, sizeof(szValue) / sizeof(SQLWCHAR), (LPWSTR)MYODBCCL("ODBCINST.INI") ) > 0 ) + if ( SQLGetPrivateProfileString( stringFriendlyName.utf16(), pszEntryName, L"", szValue, sizeof(szValue) / sizeof(SQLWCHAR), L"ODBCINST.INI" ) > 0 ) { QString stringEntryName = QString::fromStdWString( pszEntryName ); @@ -164,13 +123,13 @@ bool MYODBCInsDriver::doWrite() { if ( !stringFriendlyName.isEmpty() && - !SQLWritePrivateProfileString( stringFriendlyName.toStdWString().data(), NULL, NULL, (LPWSTR)MYODBCCL("ODBCINST.INI") ) ) + !SQLWritePrivateProfileString( stringFriendlyName.utf16(), NULL, NULL, L"ODBCINST.INI" ) ) return false; if ( !stringDRIVER.isEmpty() && - !SQLWritePrivateProfileString( stringFriendlyName.toStdWString().data(), (LPWSTR)MYODBCCL("DRIVER"), stringDRIVER.toStdWString().data(), (LPWSTR)MYODBCCL("ODBCINST.INI") ) ) + !SQLWritePrivateProfileString( stringFriendlyName.utf16(), L"DRIVER", stringDRIVER.utf16(), L"ODBCINST.INI" ) ) return false; if ( !stringSETUP.isEmpty() && - !SQLWritePrivateProfileString( stringFriendlyName.toStdWString().data(), (LPWSTR)MYODBCCL("SETUP"), stringSETUP.toStdWString().data(), (LPWSTR)MYODBCCL("ODBCINST.INI") ) ) + !SQLWritePrivateProfileString( stringFriendlyName.utf16(), L"SETUP", stringSETUP.utf16(), L"ODBCINST.INI" ) ) return false; return true; @@ -185,7 +144,7 @@ bool MYODBCInsDriver::doDelete( const QString &stringDriverName, bool bRemoveDataSourceNames, LPDWORD pnUsageCount ) { - return SQLRemoveDriver( stringDriverName.toStdWString().data(), bRemoveDataSourceNames, pnUsageCount ); + return SQLRemoveDriver( stringDriverName.utf16(), bRemoveDataSourceNames, pnUsageCount ); } MYODBCInsDriver MYODBCInsDriver::operator=( MYODBCInsDriver rval ) Modified: MYODBCIns/MYODBCInsLib/MYODBCInsDriverConnect.cpp =================================================================== --- MYODBCIns/MYODBCInsLib/MYODBCInsDriverConnect.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsLib/MYODBCInsDriverConnect.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -183,7 +183,7 @@ } break; default: - MYODBCCfprintf( stderr, MYODBCCL("[%s][%d][ERROR] Unhandled state.\n"), __FILE__, __LINE__ ); + MYODBCCfprintf( stderr, L"[%s][%d][ERROR] Unhandled state.\n", __FILE__, __LINE__ ); return false; } Modified: MYODBCIns/MYODBCInsLib/MYODBCInsLib.pro =================================================================== --- MYODBCIns/MYODBCInsLib/MYODBCInsLib.pro 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsLib/MYODBCInsLib.pro 2005-12-28 07:30:09 UTC (rev 19) @@ -11,6 +11,7 @@ CONFIG += staticlib CONFIG += console INCLUDEPATH += ../../MYODBCC/include +INCLUDEPATH += ../../MYODBCDbg/include INCLUDEPATH += ../include # ######################################################### @@ -40,6 +41,7 @@ MYODBCInsInternal.h SOURCES = \ + MYODBCIns.cpp \ MYODBCInsDriver.cpp \ MYODBCInsDataSource.cpp \ MYODBCInsDriverConnect.cpp Modified: MYODBCIns/MYODBCInsTest/MYODBCInsTest.cpp =================================================================== --- MYODBCIns/MYODBCInsTest/MYODBCInsTest.cpp 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsTest/MYODBCInsTest.cpp 2005-12-28 07:30:09 UTC (rev 19) @@ -19,6 +19,7 @@ if ( !driver.doWrite() ) { + MYODBCDbgPrint2( "%s", MYODBCIns::getErrors().join( "\n" ).toStdWString() ); return 0; } @@ -33,15 +34,29 @@ { MYODBCInsDriver driver; - if ( !driver.doRead( "mytest Friendly Name" ) ) + if ( !driver.doRead( "mytestDRIVER" ) ) + { + QStringList stringlist = MYODBCIns::getErrors(); + if ( stringlist.isEmpty() ) + { + MYODBCDbgPrint( "Unknown error" ); + } + else + { + MYODBCDbgPrint2( "%s", MYODBCIns::getErrors().join( "\n" ).toStdWString() ); + } return 0; + } QString stringResult; QTextStream textstream( &stringResult ); +// QTextStream textstream( stderr ); textstream << driver; if ( stringResult != stringOutput ) + { return 0; + } return 1; } @@ -49,7 +64,7 @@ /* create new DSN */ int test3() { - QStringList stringlistDataSourceNames = MYODBCInsDataSource::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE_USER ); + QStringList stringlistDataSourceNames = MYODBCIns::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE_USER ); if ( stringlistDataSourceNames.contains( "mytestDSN" ) ) return 0; @@ -70,7 +85,9 @@ datasource.setSTMT( "" ); if ( !datasource.doWrite() ) + { return 0; + } QTextStream textstream( &stringOutput ); textstream << datasource; @@ -109,7 +126,7 @@ /* verify delete DSN */ int test6() { - QStringList stringlistDataSourceNames = MYODBCInsDataSource::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE_USER ); + QStringList stringlistDataSourceNames = MYODBCIns::getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE_USER ); if ( stringlistDataSourceNames.contains( "mytestDSN" ) ) return 0; @@ -134,7 +151,7 @@ /* verify delete DRIVER */ int test8() { - QStringList stringlistDriverNames = MYODBCInsDriver::getDriverNames(); + QStringList stringlistDriverNames = MYODBCIns::getDriverNames(); if ( stringlistDriverNames.contains( "mytestDRIVER" ) ) return 0; @@ -158,9 +175,8 @@ }; int n; - gpMYODBCDbg = new MYODBCDbg( + MYODBCDbgInit( stderr ); - for ( n = 0; tests[n].name; n++ ) { printf( "%-40s", tests[n].name ); @@ -173,6 +189,8 @@ } } + MYODBCDbgFini(); + return 0; } Modified: MYODBCIns/MYODBCInsTest/MYODBCInsTest.pro =================================================================== --- MYODBCIns/MYODBCInsTest/MYODBCInsTest.pro 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/MYODBCInsTest/MYODBCInsTest.pro 2005-12-28 07:30:09 UTC (rev 19) @@ -10,9 +10,10 @@ include( ../../odbc.pri ) CONFIG += console INCLUDEPATH += ../../MYODBCC/include +INCLUDEPATH += ../../MYODBCDbg/include INCLUDEPATH += ../include LIBS += -L../../lib -LIBS += -lMYODBCIns +LIBS += -lMYODBCIns -lMYODBCDbg win32 { LIBS += kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib Modified: MYODBCIns/include/MYODBCIns.h =================================================================== --- MYODBCIns/include/MYODBCIns.h 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/include/MYODBCIns.h 2005-12-28 07:30:09 UTC (rev 19) @@ -5,5 +5,20 @@ #include #include +class MYODBCIns +{ +public: + static RETCODE setError( const QString &stringMessage, DWORD nErrorCode = ODBC_ERROR_GENERAL_ERR ); + + static QStringList getDriverNames(); + static QStringList getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE nScope ); + static RETCODE getError( WORD nError, DWORD *pnErrorCode, QString &stringMessage ); + static QString getError( WORD nError ); + static QStringList getErrors(); + + static bool isExistsDataSourceName( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ); + +}; + #endif Modified: MYODBCIns/include/MYODBCInsDataSource.h =================================================================== --- MYODBCIns/include/MYODBCInsDataSource.h 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/include/MYODBCInsDataSource.h 2005-12-28 07:30:09 UTC (rev 19) @@ -64,10 +64,7 @@ QString getOPTION(); MYODBC_INS_DATASOURCE_MODE getMode(); MYODBC_INS_DATASOURCE_SCOPE getScope(); - static QStringList getDataSourceNames( MYODBC_INS_DATASOURCE_SCOPE nScope ); - static bool isExistsDataSourceName( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ); - bool doRead( const QString &stringDataSourceName, MYODBC_INS_DATASOURCE_SCOPE nScope ); bool doRead( const QString &stringDataSourceName ); bool doRead(); Modified: MYODBCIns/include/MYODBCInsDriver.h =================================================================== --- MYODBCIns/include/MYODBCInsDriver.h 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCIns/include/MYODBCInsDriver.h 2005-12-28 07:30:09 UTC (rev 19) @@ -19,7 +19,6 @@ QString getFriendlyName(); QString getDRIVER(); QString getSETUP(); - static QStringList getDriverNames(); bool doRead( const QString &stringFriendlyName ); bool doWrite(); Modified: MYODBCTst/MYODBCTst.vpj =================================================================== --- MYODBCTst/MYODBCTst.vpj 2005-12-27 20:07:41 UTC (rev 18) +++ MYODBCTst/MYODBCTst.vpj 2005-12-28 07:30:09 UTC (rev 19) @@ -23,7 +23,7 @@ CaptureOutputWith="ProcessBuffer" SaveOption="SaveWorkspaceFiles" RunFromDir="%rw"> - + +#include typedef struct tMYODBC_TST { Modified: defines.pri =================================================================== --- defines.pri 2005-12-27 20:07:41 UTC (rev 18) +++ defines.pri 2005-12-28 07:30:09 UTC (rev 19) @@ -61,7 +61,7 @@ # ######################################################### # Enable/disable UNICODE build option. # ######################################################### -DEFINES += UNICODE +DEFINES += UNICODE _UNICODE # ######################################################### # LDFLAGS was brought in to get -ldl for Solaris 8 build Modified: doxygen.config =================================================================== --- doxygen.config 2005-12-27 20:07:41 UTC (rev 18) +++ doxygen.config 2005-12-28 07:30:09 UTC (rev 19) @@ -392,7 +392,7 @@ # with spaces. INPUT = ./MYODBCC/include \ - ./MYODBCC/MYODBCCLib \ + ./MYODBCC/Lib \ ./MYODBCRtti/include \ ./MYODBCDbg/include \ ./MYODBCDbg/MYODBCDbgLib \