我用VB和MO读取arcsde里面矢量数据的属性信息,结果发现文本字段的值统统为NULL,但是数字字段能正确读出来,如果把数据直接做成shapefile文件的话用同一段代码可以正确读出来,有没有谁知道原因啊?
代码如下:
    Dim l As New MapLayer
    Dim p As Point
    Dim recs As New Recordset
    Dim fld As Field
    Set l = mapDisp.Layers(0)
        Set p = mapDisp.ToMapPoint(X, Y)
    
    Set recs = l.SearchShape(p, moPointInPolygon, "")
    
    If Not recs.EOF Then
        ' clear out existing info
        List1.Clear
        
        For Each fld In recs.Fields  ' iterate over the fields
            List1.AddItem fld.Name & "    -     " & fld.ValueAsString & "  -  " & fld.Type   ' get the value
            
        Next fld
    End If