[Gambas-user] Result sets and the fields they contain...

Ron Onstenk ronstk at ...239...
Tue Jul 25 19:16:31 CEST 2006


On Tuesday 25 July 2006 15:30, sbungay wrote:
> Correction
> 
> Y = ResultSet[ResultSet.Field[X].Name]
> 
> or
> 
> For X = 1 TO ResultSet.Fields.Count
>     Grid.Current.Text = ResultSet[ResultSet.Field[X].Name]
> Next
> 

Do I miss here something?

ResultSet[key as string] returns the value of the field.

You use now for the key _ResultSet.Field[X].Name_
where X is a integer number for the index.
When I'm right _ResultSet.Field[X]_ should return the value
of the field.

Looks to me next should do the same in that case ?

  For X = 1 TO ResultSet.Fields.Count
    Grid.Current.Text = ResultSet.Field[X]
  Next


For sure I miss something else.

regarding the help
Field has properties Default, length, name, table and type.
Where is the value coming from?
At least for logical reason .Field.Value should be there too.
Why should I have .Field[X].Name, .Field[X].Type and not .Field[X].Value ?

My 2 cents
Ron




More information about the User mailing list