Re: [gnome-db]Hi...
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Marcelo Elias Del Valle <marceloelias iname com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db]Hi...
- Date: 03 Jul 2001 12:05:50 +0200
On 02 Jul 2001 22:10:42 -0300, Marcelo Elias Del Valle wrote:
> On Tue, Jul 03, 2001 at 12:21:13AM +0200, Rodrigo Moya wrote:
> > ok, the problem is localhost. It should be HOST=localhost;... I'll have
> > a look to see what's failing. But, for the moment, you can change it
> > yourself in that same dialog.
> I corrected this, but it continues giving me the same error...
>
hmm, strange. Is the MySQL server correctly set up to accept connections
for the user/host you're using to connect?
> > ah, ok, the parameter to gda_connection_new is a bad design decision,
> > and will be removed in the next versions. But you can do:
> >
> > GdaConnection *cnc = gda_connection_new (gda_corba_get_orb ());
> >
> > to fill the grid:
> >
> > gulong reccount;
> > GdaRecordset *recset = gda_connection_execute (cnc, "select * from
> > table", &reccount);
> > gnome_db_grid_set_recordset (grid, recset);
> Great! One last thing... Where did I set up the provider, host and other
> "data source parameters" ?
>
yes, the whole code should be something like this:
GdaDsn *dsn;
GdaConnection *cnc;
dsn = gda_dsn_find_by_name ("dsn_name");
if (dsn) {
cnc = gda_connection_new (gda_corba_get_orb ());
gda_connection_set_provider (cnc, GDA_DSN_PROVIDER (dsn));
gda_connection_open (cnc, GDA_DSN_DSN (dsn), username, password);
}
Anyway, I'm going to add right now a new function so that you'll be able
to do the same as before with just doing:
cnc = gda_connection_new_from_dsn ("dsn_name");
But until I add it, you must use the code above.
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]