[Gambas-user] Not an Object question
Steven Lobbezoo
steven at ...1652...
Thu Feb 21 14:21:50 CET 2008
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
Le jeudi 21 février 2008 à 04:38 +0100, Ron Onstenk a écrit :
> On Wednesday 20 February 2008 21:01, Steven Lobbezoo wrote:
> > Hi,
> >
> > I donnot get it (again ;-) )
> >
> > I do :
> > IF Res.Fields[CFields[i]].Type = db.Date THEN
> >
> > where Res is a valid result set and CFields[i] contains the name of the
> > field.
> > If I select "Res.Fields[CFields[i]].Type" in the debugger I get a 9,
> > wich is correct !
> > When I run the program it stops on this line with : 'Not an Object'
> > However, when i look into "Res.Fields[CFields[i]]" the object is there
> > with all items filled corectly (Name, Type, ...)
> >
> > What do i do wrong ?
> >
> > Steven
> Are the names in CFields array of the same case as in the database, just in case?
> Did you create the database with the gambas-database-manager?
>
> For the remaining not much as we also do ourselfs too :=)
>
>
> Try following in the (sub) routine
>
> DIM tmptype as integer
> DIM tmpdata as Date
>
> tmptype = Res.Fields[CFields[i]].Type
> tmpdata = Res.Fields[CFields[i]]
>
> IF tmptype = db.Date THEN
>
> Where does the error occur exact?
>
> Ron
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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