> 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
> 

Hi, Vassili.

I need your full project source and a SQL dump of your database, and which 
database backend you are using.

And change_bgcolor() can be written this way:

SUB change_bgcolor(labelname AS String)
  Form1[labelName].Background = Color.Red
END

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
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