[Gambas-user] Maybe a bug in how Gambas manages open DB connections
Doriano Blengino
doriano.blengino at ...1909...
Sat Sep 6 10:47:11 CEST 2008
Kari Laine ha scritto:
> Hi again,
>
> now I think I understand what the problem is - I did notice it straight away
> because I had only 1 record on both tables. I do not get any error from the
> Gambas but the Risultato.movefirst has no effect. It returns the record that
> was searched for in the first place in Risultato =
> Connessione.Find("asiakas", "id=&1", Trim(TextBox1.Text))
>
> Also I have stupid question result.movefirst should return a boolean how I
> can store that?
> dim firstOk as Boolean
> firstOK = result.movefirst gives an error - I know this is stupid question.
>
You get a message like "Wanted boolean, got function", right?
I think the problem is solved like this:
firstOK = result.movefirst() ' trailing "()", like C
The parentheses are required to tell gambas that result.movefirst has to
be called/executed, instead of simply take its address in memory. They
are not always required, because in other situations the compiler can
understand by itself what to do with a function name.
Cheers, Doriano.
More information about the User
mailing list