Vassili,

Make sure there is data in the rsThesi!thesi field.

Open a terminal, and login to mysql and do the Select statement from there
and see if all the records have data on the thesi field.

if not then you have to do something like this

if isNull(rsThesi!thesi) = false then change_bgcolor("Label" &
rsThesi!thesi)

I hope this helps

Regards,
Dimitris

On Sat, Oct 17, 2009 at 10:29 AM, Vassilis K <[email protected]> wrote:

> I get error:
> "Result is not available"
> at line:
> "change_bgcolor("Label" & rsThesi!thesi)"
>
> of the code:
>
> PUBLIC SUB Form_Open()
>  DIM i AS Integer
>  DIM rsThesi AS Result
>     MODMain.Connect()
>    rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax =
> 0")
>     rsThesi.MoveFirst
>     WHILE rsThesi.Index < rsThesi.Count
>      change_bgcolor("Label" & rsThesi!thesi)
>       rsThesi.MoveNext
>     WEND
>    MODMain.$Con.Commit()
> END
>
> SUB change_bgcolor(labelname AS String)
>  DIM alabel AS Object '
>  FOR EACH alabel IN Form1.Children
>    IF alabel.name = labelname THEN
>      alabel.background = color.red
>    END IF
>  NEXT
> END
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to