[fdo-commits] r704 - trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Rd

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Jan 29 14:58:20 EST 2007


Author: gavincramer
Date: 2007-01-29 14:58:20 -0500 (Mon, 29 Jan 2007)
New Revision: 704

Modified:
   trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Rd/OraDbObjectReader.cpp
Log:
Port FDO335 from 3.2.x to trunk

Modified: trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Rd/OraDbObjectReader.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Rd/OraDbObjectReader.cpp	2007-01-29 19:54:29 UTC (rev 703)
+++ trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Rd/OraDbObjectReader.cpp	2007-01-29 19:58:20 UTC (rev 704)
@@ -156,8 +156,13 @@
 	if ( dblinkName.GetLength() > 0 )
 		readerName += FdoStringP::Format(L"_%ls", (FdoString*)dblinkName );
 
+#ifdef ODBCORA_USE_STATIC_CURSORS
+    // Using static cursors is currently turned off due to a defect
+    // in ODBC with re-use of bound values.
     FdoSmPhReaderP reader = mgr->GetStaticReader ( readerName );
-
+#else
+    FdoSmPhReaderP reader;
+#endif
     if ( !reader ) {
         // Create binds for owner and optional object names
         FdoSmPhRdDbObjectBindsP binds = new FdoSmPhRdDbObjectBinds(
@@ -211,9 +216,12 @@
         FdoSmPhRowP row = rows->GetItem(0);
         reader = new FdoSmPhRdGrdQueryReader(row, sqlString, mgr, binds->GetBinds() );
 
+#ifdef ODBCORA_USE_STATIC_CURSORS
 		if (reader && !join)
 			mgr->SetStaticReader ( readerName, reader );
+#endif
     }
+#ifdef ODBCORA_USE_STATIC_CURSORS
     else {
         // Re-executing so update bind variables first.
         FdoSmPhRdGrdQueryReader* pReader = (FdoSmPhRdGrdQueryReader*)(FdoSmPhReader*) reader;
@@ -242,6 +250,7 @@
 
         pReader->Execute();
     }
+#endif
 
     return reader;
 }



More information about the fdo-commits mailing list