Error : could not send data to server: Error 0

From: "pawan shirbhate" <pawanshirbhate(at)googlemail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Error : could not send data to server: Error 0
Date: 2007-10-25 10:47:26
Message-ID: 65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

I am getting following error while sending the 15000 records using
PQputline() to postgreSQL DB.

*could not send data to server: Error 0*

Code snap:-

strBuf =
"abc1798,2,26120,34760,653,869,60880,1522,05/24/2007,123456712";
strBuf += "\n";
printf("\n%s\n",strBuf.c_str());

for(i=0;i<15000;i++)
{
/* Send a single row */
copy_result = PQputline(conn, strBuf.c_str());
if(copy_result != 0)
{
printf("\n%s\n", PQerrorMessage(conn));
}

}

copy_result = PQendcopy(conn);
if(copy_result != 0)
{
printf("\n%s\n", PQerrorMessage(conn));
}

Platform - Solaris 10 (x86 based processor)
PostgreSQL version - 8.2.0
Interface - libpq
Application language - C/C++

Appreciate help!!!

Regards,
Pawan

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message andrew klassen 2007-10-25 21:15:45 is libpq thread safe without configure enable_thread_safety=yes
Previous Message frank asabere 2007-10-24 19:06:00 l need help