===================================================================
--- ogrocitablelayer.cpp	(revision 21971)
+++ ogrocitablelayer.cpp	(working copy)
@@ -283,6 +283,8 @@
             OGROCIStatement oDimStatement2( poSession );
             char **papszResult2;
 
+			CPLErrorReset();
+			
             oDimCmd2.Appendf( 1024,
                 "select m.sdo_index_dims\n"
                 "from   all_sdo_index_metadata m, all_sdo_index_info i\n"
@@ -299,6 +301,11 @@
             {
                 iDim = atoi( papszResult2[0] );
             }
+            else
+            {
+            	// we want to clear any errors to avoid confusing the application.
+            	CPLErrorReset();
+            }
         }
         else
         {
