Get Recordset Object from SDE Database (Trying to load Listbox with attribute values)

Discussion created by forrestkaye on Jan 10, 2012
Latest reply on Jan 11, 2012 by forrestkaye
So What I'm trying to do is populate a listbox with all the attribute values from a feature layer.  I had accomplished this before when this dataset was in a personal geodatabase but now that it is in an SDE database I cannot use the same objects. 

I am working in VisualStudio 2010 writing in VB.Net.  The original business logic I am referencing was written in VBA for 9.3.  I am now using Arc 10.

The part for loading the values into the listbox will be simple as long as I have something to loop through that will return a value for a field.

1.  How do I return a recordset from an SDE database?


2.  Is there an easier way to do this?

psudo code of what I'm trying to do:

Dim pRecordset as recordset object


Loop pRecordset until End of File
      MyListbox.Add (pRecordset.Fields("myField").Value)