Re: [gnome-db] an application using libgda2
- From: Xabier Rodríguez Calvar <xrcalvar igalia com>
- To: Marco Milanesi <kpanic muppetslab org>, gnome-db-list gnome org
- Subject: Re: [gnome-db] an application using libgda2
- Date: Mon, 5 May 2003 22:06:21 +0200
El Lunes, 5 de Mayo de 2003 08:38, Marco Milanesi escribió:
> > > hi, I'm searching an application that uses libgda2 and in particular
> > > gda_client_open_connection cause I'm trying (unsuccesfully) to connect
> > > to PostgreSQL database.
> >
> > What does it happen?
>
> I make:
>
> gda_config_save_data_source ("postgres", "PostgreSQL",
> "DATABASE=PUB",
> "Database of PUB's Ubiquitous Beer",
> NULL,
> NULL);
>
Try to put into the connection string something like HOST=localhost:
"DATABASE=PUB;HOST=localhost"
and check the permissions to conect to the database of the postgresql
configuration files.
> gda_init("TestGDA", "0.1", argc, argv);
> client = gda_client_new ();
>
> connection = gda_client_open_connection(client, "postgres", NULL, NULL, 0);
> if (connection == NULL) {
> fprintf(stderr, "Can't connect via gda\n");
> exit(EXIT_FAILURE);
> }
>
> but I get always a NULL connection.
>
> I need an example that works, thank you :)
>
> ciao,
> Marco
--
Xabier Rodríguez Calvar
Igalia S.L.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]