[Gambas-user] make Label background from Database field

Dimitris Anogiatis dosida at ...626...
Sat Oct 17 20:26:26 CEST 2009


Vassili,

Instead of change_bgcolor("Label" & rsThesi!thesi)" do

PRINT CStr(rsThesi!thesi)
PRINT CStr(rsThesi.Index)

to see where it stops make sure it actually prints the same results.

Keep in mind that the field name has to be EXACTLY the same as the one you
use in mysql.

worst comes to the worst take the MODMain.Connect() apart and line by line
make sure it works

Hope this helps

Regards,
Dimitris

On Sat, Oct 17, 2009 at 12:04 PM, Doriano Blengino <
doriano.blengino at ...1909...> wrote:

> Vassilis K ha scritto:
> > I have changed the Select of rsThesi to find only the records that thesi
> <> 0
> > as following:
> > rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 0
> > AND thesi <> 0 ")
> > Now it only counts 42 rows out of 70.
> >
> > But the error is the same as described in my previous email:
> > "Result is not available"
> > at line:
> > "change_bgcolor("Label" & rsThesi!thesi)"
> >
> Try to
>
>    PRINT rsThesi!thesi
>    PRINT "Label" & rsThesi!thesi
>
> just before the line. I can not believe this... you can also try to use
> some intermediate temporary variable, like
>
>    iTemp = rsThesi!thesi
>    change_bgcolor("Label" & iTemp)
>
> where iTemp is an integer local variable, or try the same but using a
> string sTemp.
>
> Can't believe...
>
> Regards,
>
> --
> Doriano Blengino
>
> "Listen twice before you speak.
> This is why we have two ears, but only one mouth."
>
>
>
> ------------------------------------------------------------------------------
> 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
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list