[freetds] Status: bcp

Castellano, Nicholas Nicholas_Castellano at acml.com
Fri Dec 19 11:19:24 EST 2003


> From: Lowden, James K 
> Sent: Thursday, December 18, 2003 5:13 PM
> To: 'FreeTDS Development Group'
> Subject: RE: [freetds] Status: bcp
> 
> 
> > From: Castellano, Nicholas
> > Sent: December 18, 2003 4:13 PM
> > 
> > These SYBEBBCI messages are definitely required when
> > bcp_exec() is used, and
> > I have code that relies on this behavior.
> > 
> > I don't know enough about the other parts of the bcp API to
> > say for certain
> > whether it's specific to bcp_exec() or not.
> 
> What does your handler return?

It returns INT_CANCEL.  Here is the code from my error handler routine.

  /* Be concise for "Batch successfully copied" messages.
     Print server message only if main program is not managing
     a batch counter.
  */
  if (errno == SYBEBBCI) {
    if ((batch_counter < 0) || (batch_size < 0)) {
      fprintf(stderr, "%s\n", dberrstr);
    } else {
      batch_counter += batch_size;
      fprintf(stderr, "%d records loaded to database\n", batch_counter);
    }
    dbcancel(dbproc);
    return (INT_CANCEL);
  }

-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.




More information about the FreeTDS mailing list