error in code

Поиск
Список
Период
Сортировка
От Ashok Chauhan
Тема error in code
Дата
Msg-id 1071033961.1264.7.camel@chi
обсуждение исходный текст
Список pgsql-admin
****************************
# include <stdio.h>
# include <stdlib.h>
# include <libpq-fe.h>

int main()
{
        PGresult *result;
        PGconn *conn;
        int feild;
        printf("successful");
        conn = PQconnectdb ("ashok");
        result = PQexec (conn, "select * from bill");
        feild = PQntuples (result);
        printf("%d",feild);
        PQclear (result);
        PQfinish (conn);
        printf("hello");
        return 1;


}

I written a code and compile with following command, it complied and
create 'a.out' file but when i run the a.out it give nothing.
command:- "gcc program.c -I /usr/include/pgsql/include -L
/usr/lib/libpq.a -lpq"

plz help me.
Ashok

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Re: Running Postgres Daemons with same data files
Следующее
От: Sai Hertz And Control Systems
Дата:
Сообщение: Re: Upgrading from 7.2.4 (RH 8) to 7.4 (RH9)