Search Postgresql Archives

Re: Cannot login, with C/C++ program

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

 



	Daniel wrote:

> I have written a C/C++ program that trys to log into a local
> PostgreSQL database.  Here is the code:
> 
>   pg_conn = PQconnectdb(
>     "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba'
> password = 'stelmo777' connect_timeout = '10'");
>   if (!pg_conn)
>   {
> 	return false;
>   }

In the program, you should
 fprintf(stderr, "%s", PQerrorMessage(pg_conn))
and/or
 copy-paste for us the psql command line that works.

Best regards,
-- 
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux