[mapserver-commits] r9002 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue May 5 16:43:48 EDT 2009


Author: hobu
Date: 2009-05-05 16:43:48 -0400 (Tue, 05 May 2009)
New Revision: 9002

Modified:
   trunk/mapserver/mapsde.c
Log:
attempt to fix #3001

Modified: trunk/mapserver/mapsde.c
===================================================================
--- trunk/mapserver/mapsde.c	2009-05-05 13:40:38 UTC (rev 9001)
+++ trunk/mapserver/mapsde.c	2009-05-05 20:43:48 UTC (rev 9002)
@@ -604,14 +604,18 @@
     
     SE_COLUMN_DEF *itemdefs;
     SE_SHAPE shapeval=0;
-    SE_BLOB_INFO blobval;
-    /* blobval = (SE_BLOB_INFO *) malloc(sizeof(SE_BLOB_INFO)); */
     msSDELayerInfo *sde;
 
+    SE_BLOB_INFO blobval;
+#ifdef SE_CLOB_TYPE
+    SE_CLOB_INFO clobval;
+#endif
+
 #ifdef SE_NSTRING_TYPE
     SE_WCHAR* wide=NULL;
 #endif
 
+
     if(!msSDELayerIsOpen(layer)) {
         msSetError( MS_SDEERR, 
                     "SDE layer has not been opened.", 
@@ -775,6 +779,31 @@
             break;
             
 #endif
+
+#ifdef SE_CLOB_TYPE
+
+        case SE_CLOB_TYPE:
+            status = SE_stream_get_clob(sde->connPoolInfo->stream, (short) (i+1), &clobval);
+            if(status == SE_SUCCESS) {
+                shape->values[i] = (char *)malloc(sizeof(char)*clobval.clob_length);
+                shape->values[i] = memcpy(  shape->values[i],
+                                            clobval.clob_buffer, 
+                                            clobval.clob_length);
+                SE_clob_free(&clobval);
+            }
+            else if (status == SE_NULL_VALUE) {
+                shape->values[i] = strdup(MS_SDE_NULLSTRING);
+            }
+            else {
+                sde_error(  status,  
+                            "sdeGetRecord()", 
+                            "SE_stream_get_clob()");
+                return(MS_FAILURE);
+            }
+            break;
+            
+#endif
+
         case SE_BLOB_TYPE:
             status = SE_stream_get_blob(sde->connPoolInfo->stream, (short) (i+1), &blobval);
             if(status == SE_SUCCESS) {
@@ -794,6 +823,7 @@
                 return(MS_FAILURE);
             }
             break;
+            
         case SE_DATE_TYPE:
             status = SE_stream_get_date(sde->connPoolInfo->stream, (short)(i+1), &dateval);
             if(status == SE_SUCCESS) {



More information about the mapserver-commits mailing list