[Gambas-user] make Label background from Database field

Werner wdahn at ...1000...
Thu Oct 15 20:46:18 CEST 2009


Vassilis K wrote:
> I changed it as you said :
>
> PRIVATE $alblTime AS NEW Object[]
>
> PUBLIC SUB Form_Open()
>   DIM i AS Integer
>   DIM rsThesi AS Result
>   DIM iD AS Long
>  
>   MODMain.Connect()
>     rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 
> 0")
>        FOR iD = 0 TO rsThesi!AA
>              i = rsThesi!thesi
>               $alblTime[i] = NEW Label(ME)
>               $alblTime[i].Background = Color.Red
>        NEXT
>     MODMain.$Con.Commit()
> END
>
> Now I get "Out of bounds" error at line : $alblTime[i] = NEW Label(ME)
> Did I make something wrong?
>   
It is data dependent. What happens when
     i = rsThesi!thesi
     $alblTime[i] = NEW Label(ME)
where rsThesi!thesi is -5000?

Regards,
Werner






More information about the User mailing list