Re: Need help with libpq and PQexec[RESOLVEd]

Поиск
Список
Период
Сортировка
От Juan Backson
Тема Re: Need help with libpq and PQexec[RESOLVEd]
Дата
Msg-id 27c25bc40908110052k31bfc3c9sa6b78b00336aaf04@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
I used if (PQresultStatus(res) != PGRES_TUPLES_OK)   and it is fine now.

Thanks,
JB

On Tue, Aug 11, 2009 at 3:35 PM, Juan Backson <juanbackson@gmail.com> wrote:
Hi,
In my source code, I have:

res = PQexec(conn,"select * from resource");
if(PQresultStatus(res) != PGRES_COMMAND_OK){
            switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"PQexec failed:%s\n",PQerrorMessage(conn));
            PQclear(res);
            return NULL;
        }
        PQclear(res);

When it is executed, I am getting PGexec failed error , but the return value of  PQerrorMessage(conn) is empty.

Does anyone know why?

Thanks,
JB

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

Предыдущее
От: Juan Backson
Дата:
Сообщение: Need help with libpq and PQexec
Следующее
От: Juan Backson
Дата:
Сообщение: keepalive problem with libpg connection