Skip site navigation (1) Skip section navigation (2)

Re: Error : could not send data to server: Error 0

From: Adam Radlowski <adamr(at)informatyka(dot)gdansk(dot)pl>
To: pawan shirbhate <pawanshirbhate(at)googlemail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Error : could not send data to server: Error 0
Date: 2007-10-30 10:14:39
Message-ID: 4727040F.3030903@informatyka.gdansk.pl (view raw or flat)
Thread:
Lists: pgsql-interfaces
Maybe it's not good advice, but maybe You should divide Your data into 
smaller parts ?
Brgds
Adam

pawan shirbhate wrote:
> 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
>
>   


In response to

Responses

pgsql-interfaces by date

Next:From: pawan shirbhateDate: 2007-10-30 13:02:00
Subject: Re: Error : could not send data to server: Error 0
Previous:From: Adam RadlowskiDate: 2007-10-30 10:08:37
Subject: Re: l need help

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group