[Gambas-user] Not an Object question

Ron Onstenk ronstk at ...239...
Thu Feb 21 16:54:30 CET 2008


On Thursday 21 February 2008 16:17, Steven Lobbezoo wrote:
> I use 2.1.0
> 
> Steven
> 
> Le jeudi 21 février 2008 à 14:54 +0100, Benoit Minisini a écrit :
> > On jeudi 21 février 2008, Steven Lobbezoo wrote:
> > > Hi ron,
> > >
> > >   tmpdata  = Res.Fields[CFields[i]]
> > >
> > > is impossible, but I got the idea.
> > > So, I did
> > >
> > > 	tmptype  = Res.Fields[CFields[i]].Type
> > >
> > > as per your suggestion. Now that works just fine. So I suppose it's really
> > > a bug since, when I do:
> > >
> > > 	If Res.Fields[CFields[i]].Type = db.date
> > >
> > > This reases an error, but if I assign first to a tmp field, as you
> > > sugested, it works just fine.
> > >
> > > Thanks a lot,
> > > Steven


I'm happy it was a little help :=)

I had in the past also some problems when I did use complex constructions.
In fact my example was before I did post

DIM tmpname as string
DIM tmpfield as ResultField ' or Variant or Object
DIM tmptype as integer
DIM tmpdata as Date

' get the things step by step
tmpname  = Fields[i]
tmpfield = Res.Fields[tmpname]
tmptype  = tmpfield.Type ' type
tmpdata  = tmpfield ' the value

However gambas can't DIM a ResultField in real live so you
must use Variant or Object.
 

> > >
> > 
> > Aren't you using the development version?
> > 
> 

You see the question of the gambas version as I mentioned on your request 'What do i do wrong ?' :=)



Ron





More information about the User mailing list