PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Louis N Proyect <lnp3 at columbia dot edu>
Subject: Unidentified subject!
Date: Nov 17 1995 3:35PM

Does anybody know why bcp_sendrow only send back a "1" return code 
whether or not if succeeds or fails?

Thanks, Louis Proyect
---------------------------------------------------------

#!/usr/local/bin/sybperl 

require "sybperl.pl";
require "sql.pl";

&BCP_SETL($DBTRUE);

$dbproc = &dblogin("id", "passwd", "SYBASE@CUAIX06");

&bcp_init($dbproc, "test_table", '', '', $DB_IN);
&bcp_meminit($dbproc, 3);

open(TEST, "test.txt") || die "Can't open input\n";

while()
   {chop $_;
   @extract_row = split('\t', $_);
   $ret = &bcp_sendrow($dbproc, @extract_row);
   }

$bcp_return_code = &bcp_done($dbproc);
close TEST;