[gnome-db]Re: [Glade-devel] handling gda connections
- From: Daniel Wagner <heapsort gmx net>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: Glade devel <glade-devel helixcode com>, GDA <gnome-db-list gnome org>
- Subject: [gnome-db]Re: [Glade-devel] handling gda connections
- Date: Sat, 31 Mar 2001 14:45:25 +0200
On Thu, 29 Mar 2001, Rodrigo Moya wrote:
> On 29 Mar 2001 13:08:36 +0200, Daniel Wagner wrote:
> > Hi
> >
> > Sorry for bothering you again, but I have some small problems with gnome-db. As Damon
> > proposed I have added a property which allows you to edit 'Data Source' and
> > select one. So far so good.
> > But how should I handle each connection. I see two possibilities:
> >
> > 1. Each gnome-db widget controls its own gda connections. I don't see
> > actually how this should work, but I guess its feasible. Any ideas?
> >
>
> well, it should work, but I don' think it's the best way, since this
> will duplicate data in memory, and
> make very difficult the synchronization of all the widgets.
>
> > 2. The connection are global visible. Therefore a connection can be
> > shared and furthermore it has to be opened/closed only once.
> >
>
> you should be using Gda_ConnectionPool's, which do exactly this. The
> Gda_ConnectionPool object is
> a bit incomplete, so please comment on what you think it's missing, and
> I'll add it.
> I think that's the best way, so that all widgets share the same
> connections, and get proper notifications all of them at the same time
> (for example, if you close the database, all widgets connected to that
> database could get a notification so that they refresh themselves).
But how could I connect to a signal from a Gda_Connection object? This
kind of code is not possible then, right?:
cnc = gda_connection_new (gda_corba_get_orb ());
gtk_signal_connect (GTK_OBJECT (cnc), "open",
GTK_SIGNAL_FUNC (connection_initiated_cb),
(gpointer) instance_data);
/* use gnome_db_login to open connnection */
Is there another way to do such a thing?
wagi
--
Daniel Wagner
email: wagi gmx ch
GnuPG: 1024D/DCDE890A (public key available on any keyserver)
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]