Re: [gnome-db] libgda and application development



On Mon, 2001-09-03 at 00:57, will lashell net wrote:
> 
> Hello all,
> 
Hi Will!

Nice to see you here!

> I'm attempting to use gnome-db/libgda to write an application
> to connect to our mysql database server. I am having a few 
> problems however. 
> 
> Firstly, where is there a -simple- example / tutorial application?
>
the libgda/testing/gda-test.c program, and the samples in gnome-db/test
should help you in getting starting. For more advanced code, see at
gnome-db/components and gnome-db/lib
 
> I'm having some real problems because I can't seem to find out
> how to actually use the libraries correctly in an application, or
> what I need to add to the link and compile lines.
> 
well, the first thing you'll need is a GdaConnection:

GdaConnection *cnc;

cnc = gda_connection_new (gda_corba_get_orb ());
gda_connection_set_provider (cnc, "OAFIID:GNOME_GDA_Provider_MySQL");
gda_connection_open (cnc, "data_source_name", "user", "password");

Then, you'll use the methods in Gdaconnection, GdaCommand, and
GdaRecordset to do everything.

> I've looked at the testing directories and the docs on the website
> but all of them are either way way too complicated for a first time
> user or are not relevant at all.
>
the docs are quite bad, I agree (we should really start writing a
programmer's guide), but I think the test programs, specially the ones
in gnome-db, are a good starting point.
 
> Secondly, is this the right list to post my comments / thoughts as
> I work with this, or should I use the -devel list for it?
> 
yes, it is. We don't have enough traffic to have 2 lists, so everything
is discussed in this list. So you can ask here whatever you want.

> I've worked a great deal with database development in both web
> environments and with ADO. I'm hoping that I will find libgda nice to
> use.
>
I also hope so. And please, report any inconsistency/problem/missing
thing you find. We need feedback from app developers, so we'll accept
any suggestion.
Also, it's got a similar-to-ADO design, so you should find easy to move
to libgda/gnome-db. If not, please report anything you like.
 
> Does anyone know when python bindings might be available for this, or
> have they even been planned?
> 
There is already some work for this in libgda/bindings/python. I haven't
myself even tried to compile/run it, and they may be quite out-dated,
since it's been almost a year since last time somebody worked on it. But
I think it could be a good starting point if somebody wants to work on
them.

Anyway, about the bindings, there are still some doubts I've got myself,
which is, essentially, that now that Bonobo is supported in many
languages (included python, AFAIK), and given the tendency to export
APIs via Bonobo instead of via C APIs, I'm not very sure if it would be
a good idea to make the extra work of supporting several bindings for
libgda. That is, wouldn't it be better to make sure to have the IDL
offer all functionality, and just have people write their GDA-based
programs in whatever language they want, using GDA via the IDL
interfaces?

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]