Am Samstag, den 29.08.2009, 20:32 +0200 schrieb Mathias Ebermann:
> Thanks, Benoit.
> 
> But the database connection IS open, that's why I am confused.
> 
> DataSource reads the table, and DataBrowser shows the data in the columns I 
> set in properties. So, the connection seems to be
> not the problem.
> The only things that don't work are the DataControls. They always produce 
> this "No current Connection".
> 
> Or am I completely wrong??
> I open the database connection in the PUBLIC SUB Form_Open(), first thing. 
> That's the earliest point I can imagine. I also
> tried printing out several events, and always the "connected to database" was 
> the first one, everything else came later.
> 
> Regards Mathias
> 
> 
> Benoît Minisini schrieb:
> >> 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,
> > 
Salut,

is the open connection "visible" (is the connection public declared)
where you/try to use it ?

Could you send the DB and the project as archive ?

Charlie


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to