[Gambas-user] DataControl and "No current Connection" Error
Benoît Minisini
gambas at ...1...
Sat Aug 29 14:36:33 CEST 2009
> Hi,
> new in Gambas, I encountered the following problem:
>
> I have a DataSource and a DataBrowser and managed to display the data fine.
>
> Now, I wanted to display details of the data in several DataControls.
> If I fill the "Field" property of the DataControls (e.g. Artikel), I get an
> Error Message "No Current Connection", right at the start of the program.
> Nothing runs.
> If I leave the "Field" property empty, the program runs. But, of course,
> the DataControls are empty.
>
> After a lot trial and error I found out, that doing the same thing in code
> DataControl1.Field = "Artikel"
> works. This way, everything works fine.
>
> I wonder why the "normal" way (like in the Gambas example) produces this
> error? And why does the "code" way work?
>
You must open a database connection before doing anything else.
Regards,
--
Benoît
More information about the User
mailing list