Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Ravipudi, Murali" <Murali dot Ravipudi at gs dot com>
Subject: RE: DBlib bcp in/out sample
Date: Aug 23 1999 6:49PM

Yes, I am already using it that way.

My code is like :

dblib : create temp table
dblib : call stored proc ( which fills this temp table)
system : bcp the data out from the temp table
dblib : clear the temptable ( not necessary, but in future there will be
more actions added after this. )

and I wanted to do the bcp also using dblib, rather than using the back
In the above sequence, I am getting a  "Sybase error: Attempt to initiate a
new SQL Server operation with results pending." when the bcp is called.
that is why !! ?? !! ?? 


> -----Original Message-----
> From:	Charles Zhao []
> Sent:	Monday, August 23, 1999 1:28 PM
> To:	SybPerl Discussion List
> Subject:	Re: DBlib bcp in/out sample
> I would not suggest using DBLib bcp calls if your data is huge.  If you
> are  
> handling large data set, using direct sybase bcp calls is more efficient.
> An  
> example (bcp in) is:
> $bcpCommand = "$ENV{SYBASE}/bin/bcp $db..$Table in $inFile -f $fmtFile -U
> $user -P $psw -S $DBSERVER -b $batchSize -m $maxNumOfErrors -e $errFile";
> @output = `$bcpCommand`;
> REF:  Sybase utilities manual.
> Points to Know:
> 1.  Failover roll back;
> 2.  If you have bcp v.11, go back use v10. as v11 has a bug.
> Charles Zhao