[Gambas-user] Result is not available

Benoit Minisini gambas at ...1...
Tue Nov 22 10:38:45 CET 2005


On Tuesday 22 November 2005 02:40, Fabricio Santos wrote:
> In this small piece of code I am insistently getting a meesage box with
> the following error at runtime: "Result is not available"
>
> PUBLIC SUB ComboBox1_Click()
>   DIM res AS Result
>   DIM sql AS String
>
>   resManager.MoveFirst
>   resManager.MoveTo( ComboBox1.Index)
>   sql = "select city from office" &
>   " where manager_id=" & resManager!id
>   res = conn.Exec(sql)
>   textbox1.Text=res!city
> END
>
> If I watch "ComboBox1.Index" it yelds 0, which is correct.
> If I watch "resManager!id" it yelds 1, which is also correct.
> But it stops at line "res = conn.Exec(sql)" with the error above.
>
> I am running Gambas 1.0.3. Might this be a bug? I couldn't find much on
> this front.
>
> Thanks in advance for any help.
>

Maybe you actually get the error on textBox1.Text = res!City, because your sql 
request returns no result.

Otherwise try a more recent version of Gambas.

Note: resManager.MoveFirst is not necessary, if you do a MoveTo just after.

Regards,

-- 
Benoit Minisini





More information about the User mailing list