SQLSelect Question

Chuck Pelto cbpelto at pcisys.net
Thu Feb 2 17:51:54 CST 2006


On Feb 2, 2006, at 2:18 PM, Ruslan Zasukhin wrote:

> I do not see still why you need ArraySet, but if you need it you  
> can use
> this way:
>
>     cursor = db.SqlSelect( "SELECT DISTINCT f1, f2 FROM T" )
>
>     arrayset = cursor.ToArraySet()

Well...RB doesn't really play with arrays all that well. For example,  
sorting is only for one-dimensional arrays. Whereas sorting a cursor  
of multiple fields is so hard with V4RB2, as I understand it.

So, getting the data and sorting IT in V4RB2 and then passing it to  
RB as an array seemed to me to be the best way to go about getting  
around RB's difficulty in managing arrays.

[1] Get an complex data structure, using the 'SELECT DISTINCT'.
[2] Sort it using SORT BY.
[3] Make it available as an array to RB via VArraySet.
[4] Start 'slicing and dicing' the data into a contextual menu to  
show up in a window of an RB project. [Note: You may or may not have  
noticed the discussion going on over at RB over recusions.]

I think I can really bust some heads in programming my projects if I  
get a handle on this.

Regards,

Chuck
P.S. Thanks for showing me how to get an arrayset. Too bad they don't  
work with strings.

P.P.S. Could that be a new feature?


More information about the Valentina mailing list