List:Commits« Previous MessageNext Message »
From:ahristov Date:April 23 2007 11:53am
Subject:Connector/ODBC 5 commit: r890 - branches/feature-cursor-design/SDK/Installer/Library
View as plain text  
Modified:
   branches/feature-cursor-design/SDK/Installer/Library/MYODBCIns.cpp
Log:
Merge from trunk.


Modified: branches/feature-cursor-design/SDK/Installer/Library/MYODBCIns.cpp
===================================================================
--- branches/feature-cursor-design/SDK/Installer/Library/MYODBCIns.cpp	2007-04-23 11:51:27
UTC (rev 889)
+++ branches/feature-cursor-design/SDK/Installer/Library/MYODBCIns.cpp	2007-04-23 11:53:25
UTC (rev 890)
@@ -60,7 +60,7 @@
 
                 SQLGetPrivateProfileString() with a NULL 1st arg does
                 not return anything - ever. To return a list of drivers
-                we can use SQLGetInstalledDrivers() instead.                
+                we can use SQLGetInstalledDrivers() instead.
 
     \param
 
@@ -407,6 +407,7 @@
     QChar       cNull( '\0' );
     QChar       cSemi( ';' );
     std::wstring msg;
+    BOOL        ret;
 
     if ( !pnUsageCount )
         pnUsageCount = &nUsageCount;
@@ -419,15 +420,11 @@
     }
 
     MYODBCCString::QString_toWString( stringNameAttributes, &msg );
-    if ( !SQLInstallDriverEx(msg.c_str(), 0, sLocation, FILENAME_MAX,
+    ret = SQLInstallDriverEx(msg.c_str(), 0, sLocation, FILENAME_MAX,
                              &nLocationLength, ODBC_INSTALL_COMPLETE,
-                             pnUsageCount ) )
-    {
-        DBUG_PRINT("oreturn", ( "%d",  false ));
-        DBUG_RETURN( false );
-    }
+                             pnUsageCount);
 
-    DBUG_PRINT("oreturn", ( "%d",  true ));
+    DBUG_PRINT("oreturn", ( "%d",  ret ));
     DBUG_RETURN( true );
 }
 
@@ -437,6 +434,7 @@
 
     DWORD nUsageCount = -1;
     std::wstring msg;
+    BOOL        ret;
 
     if ( stringName.isNull() )
     {
@@ -449,19 +447,16 @@
         pnUsageCount = &nUsageCount;
 
     MYODBCCString::QString_toWString( stringName, &msg );
-    if ( !SQLRemoveDriver( msg.c_str(), bRemoveDSNs, pnUsageCount ) )
-    {
-        DBUG_PRINT("oreturn", ( "%d",  false ));
-        DBUG_RETURN( false );
-    }
+    ret = SQLRemoveDriver( msg.c_str(), bRemoveDSNs, pnUsageCount );
 
-    DBUG_PRINT("oreturn", ( "%d",  true ));
+    DBUG_PRINT("oreturn", ( "%d",  ret ));
     DBUG_RETURN( true );
 }
 
 BOOL MYODBCIns::doInsertDataSource( const QString &stringName, const QString
&stringAttributes, MYODBCInsDataSource::DATASOURCE_SCOPE nScope )
 {
     DBUG_ENTER("MYODBCIns::doInsertDataSource");
+    BOOL    ret;
 
     if ( stringName.isNull() )
     {
@@ -489,14 +484,10 @@
     datasource.setMode( MYODBCInsDataSource::DATASOURCE_MODE_DSN_VIEW );
 
     /*! \todo */
+    
+    ret = datasource.doWrite( nScope );
 
-    if ( !datasource.doWrite( nScope ) )
-    {
-        DBUG_PRINT("oreturn", ( "%d",  false ));
-        DBUG_RETURN( false );
-    }
-
-    DBUG_PRINT("oreturn", ( "%d",  true ));
+    DBUG_PRINT("oreturn", ( "%d",  ret ));
     DBUG_RETURN( true );
 }
 
@@ -617,8 +608,11 @@
     BOOL b = false;
     DBUG_ENTER("MYODBCIns::isDelim");
 
-    if ( isDelimKeywordValue( stringKeywordValues[nScanChar], pnDelim ) ||
isDelimKeywordValues( stringKeywordValues, nScanChar, *pnDelim ) )
+    if (isDelimKeywordValue( stringKeywordValues[nScanChar], pnDelim ) ||
+        isDelimKeywordValues( stringKeywordValues, nScanChar, *pnDelim ))
+    {
         b = true;
+    }
 
     DBUG_PRINT("oreturn", ( "%d",  b ));
     DBUG_RETURN( b );

Thread
Connector/ODBC 5 commit: r890 - branches/feature-cursor-design/SDK/Installer/Libraryahristov23 Apr