[Gambas-user] casting, macro change from str to resultfield?
ron
ronstk at ...239...
Tue Jan 3 10:10:28 CET 2006
On Tuesday 03 January 2006 08:34, johnf wrote:
> On Monday 02 January 2006 23:30, johnf wrote:
> > On Monday 02 January 2006 23:18, ron wrote:
> > > oopfield = hfield.Value
> >
> > Thanks that should work.
> >
> > But I also realized that Gambas is a compiled lang - therefore there is
> > nothing like macro substitution....
> >
> > Thanks again
> > John
> >
> >
> Dam I thought you had the answer. But hfield does not have "Value".
>
> But I wonder if something else does? I'll continue to check.
> BTW I'm using 1.9.23
> Thanks
> John
>
>
Did a look in the help
gb.db.result:
DIM hResult AS Result
DIM aVariant AS Variant
aVariant = hResult [ Field AS String ]
Returns the value of a field in the current record of the Result object.
should be then:
FOR EACH hfield IN contactdata.Fields
INC i
loopfield = contactdata[hfield.Name]
contacts[c, i].Text = loopfield
NEXT
contactdata = result
contacts = gridview
I hoop this wil do the job.
Ron
More information about the User
mailing list