[gnome-db] Re: please help connecting to databse
- From: Neil Zanella <nzanella gmail com>
- To: GNOME-DB List <gnome-db-list gnome org>
- Subject: [gnome-db] Re: please help connecting to databse
- Date: Sat, 6 Nov 2004 00:02:11 -0700
Just wanted to add, the database server really is running on the given
5432 port,
and I can really connect to it from the command line as user joedoe. However,
I can't connect with libgda.
How come can't I connect with libgda?
Thanks,
Neil
On Fri, 5 Nov 2004 23:59:51 -0700, Neil Zanella <nzanella gmail com> wrote:
> Hello,
>
> I am not sure what I am doing wrong, but I am trying to connect to a PostgreSQL
> database. I issue the following:
>
> gchar *provider = "PostgreSQL";
> gchar *cnc_string = "HOST=localhost;PORT=5432;DATABASE=joedb;USER=joedoe";
>
> connection = gda_client_open_connection_from_string(client,
> provider, cnc_string, (GdaConnectionOptions) 0);
>
> gchar *query = "INSERT INTO JPeople (jperson) VALUES ('Jane Dane')";
>
> command = gda_command_new (query,
> GDA_COMMAND_TYPE_SQL,
> GDA_COMMAND_OPTION_STOP_ON_ERRORS);
>
> CRITICAL **: file gda-connection.c: line 754
> (gda_connection_execute_command): assertion GDA_IS_CONNECTION (cnc)'
> failed
>
> also tried:
>
> gda_connection_execute_non_query(cnc, command, NULL);
>
> and got:
>
> CRITICAL **: file gda-connection.c: line 843
> (gda_connection_execute_non_query): assertion `GDA_IS_CONNECTION
> (cnc)' failed
>
> So where am I going wrong??
>
> Thanks,
>
> Neil
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]