[Gambas-user] For Each ?WHAT? in Result

Caveat Gambas at ...1950...
Sat Jan 10 10:04:14 CET 2015


I presume you started here http://gambaswiki.org/wiki/comp/gb.db/result
And then clicked on the big obvious link to FOR EACH, arriving here: 
http://gambaswiki.org/wiki/lang/foreach
And then didn't look at the second example... :-P

Kind regards,
Caveat

On 10/01/15 09:52, Lewis Balentine wrote:
> Result (gb.db)
> This class represents the result of a SQL request.
> This class is not creatable.
> This class acts like a read / write array.
> This class is *enumerable* with the FOR EACH keyword.
>
> Guess this should be obvious but not to me .... pray tell what
> type/class does one use to enumerate it ??
> I tried "ResultField[]"
> I tried "Collection"
> I tried to try "record"
> As a last resort I tried String[]
> Suffice it to say: I have not a clue :-\
>
> ========
> Dim MyResult as Result
> Dim MyRecord as ?????
>
> Result = Connection.Find (Something)
>
> For Each MyRecord in MyResult
>       Print MyRecord["Field1Name"]
> Print MyRecord["Field2Name"]
> Print MyRecord["Field3Name"]
> Next
> ============
> regards,
>
> Lewis
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>





More information about the User mailing list