[mapguide-commits] r4225 - trunk/MgDev/Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Sep 15 20:46:09 EDT 2009


Author: leaf
Date: 2009-09-15 20:46:08 -0400 (Tue, 15 Sep 2009)
New Revision: 4225

Modified:
   trunk/MgDev/Server/src/Services/Feature/ServerSqlCommand.cpp
Log:
Ticket #1073: Implement MapGuide RFC 80 - Parameter Binding. 

This ticket is to fix one bug on MgSFeatureService::ExecuteNonQuery(). Out parameter doesn't work because we put MgServerFeatureUtil::UpdateParameterCollection(...) before fdoCommand->ExecuteNonQuery(). So after SQL statement is executed, parameter isn't updated.


Modified: trunk/MgDev/Server/src/Services/Feature/ServerSqlCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerSqlCommand.cpp	2009-09-15 21:49:09 UTC (rev 4224)
+++ trunk/MgDev/Server/src/Services/Feature/ServerSqlCommand.cpp	2009-09-16 00:46:08 UTC (rev 4225)
@@ -109,13 +109,13 @@
         MgServerFeatureUtil::FillFdoParameterCollection(params, fdoParams);
     }
 
+    // Execute the command
+    rowsAffected = fdoCommand->ExecuteNonQuery();
+
     // Update parameter whose direction is InputOutput, Output, or Return.
     if (NULL != params && params->GetCount() > 0)
         MgServerFeatureUtil::UpdateParameterCollection(fdoParams, params);
 
-    // Execute the command
-    rowsAffected = fdoCommand->ExecuteNonQuery();
-
     MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgServerSqlCommand.ExecuteQuery")
 
     return rowsAffected;



More information about the mapguide-commits mailing list