Adding/merging cursors

Erik Mueller-Harder valentina-list at vermontsoftworks.com
Thu Nov 18 16:53:23 CST 2004


> Hm, sounds like they might be very useful here. How do you pull 
> individual field data out of a VSet record? I don't see anything in 
> sparse docs that there are, and autocomplete doesn't suggest anything 
> obvious.

I've gleaned most everything I know from the examples -- though I'll 
admit that even there, in an effort to make the examples easy to 
generate & update, some basic elements are obscured.  Here's a short 
bit that works for me (note that this is all via Class methods):

   Dim vt as MyTableClass
   Dim vs as VSet
   Dim vsi as VSetIterator

   vt = db.myTable

   vs = vt.lastName.Find(nameString)
   vsi = vs.MakeNewIterator
   if vt.GoToRecID(vsi.FirstItem) then
     editFieldTitle.text = vt.title.value
     checkBoxAccessible.value = vt.accessible.value
	...
   end if

In other words, the VSetIterator returns a recID, which you then use in 
the table's GoToRecID method.  From that point, you can simply refer to 
the table's field properties (such as "title" and "accessible" in my 
example) and retrieve their values.  Here, I'm getting values only for 
the first  record in the set; I could set up a loop instead, using the 
VSetIterator.NextItem method.

Have fun exploring....

-- Erik



More information about the Valentina-beta mailing list