pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pawan shirbhate <pawanshirbhate@googlemail.com>
To: pgsql-interfaces@postgresql.org
Subject: Error : could not send data to server: Error 0
Date: Thu, 25 Oct 2007 16:17:26 +0530
Message-ID: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com> (raw)

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

view thread (5+ messages)  latest in thread

Message-ID: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com>
Permalink:  ../65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com/
Also on:    postgresql.org/message-id/65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pawanshirbhate@googlemail.com
  Subject: Re: Error : could not send data to server: Error 0
  In-Reply-To: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox