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: "Wechsler, Steven" <steven dot wechsler at wsaccess dot com>
Subject: RE: How to use BCP and Perl
Date: Sep 19 2002 12:41PM

> On Tue, 2002-09-17 at 12:53, Mark Sutfin wrote:
> > To BCP data into an SQL Server db table, I have been using this code
> > snippet:
> > system 'bcp ccr_dev..personofferhistoryload in
> > g:\agisdev\docs\currdev\11425\bcp_infile.txt -c -e 
> bcpload_fail.txt -h
> > "ORDER (personid ASC)" -Uusername -Ppasswd -Sservername';
> > I would like to capture some of BCP's messages, (e.g. 
> starting to copy, rows
> > sent to server, packet size).
> > I realize this is not a list for SQL Server, but any 
> direction would be much
> > appreciated.
> > SQL Server 2000

Mark, the best (or at least most straightforward, if you're already using
Sybperl) way would probably be to use MSSQL Perl by Erland Sommarskog, which
can be found here:

It's based on Sybperl (although it doesn't a support community like Sybperl;
I've tried to convinced Erland to set up something, but he seems to prefer
supporting on a case-by-case basis) so should be fairly easy for you to use
(some of the calls are slightly different, so it's not just a simple
changing of Use statements)...and yes, it supports BCP.

Steve Wechsler/Application Manager/Wall St. Access
"There is no reason anyone would want a computer in their home." 
-- Ken Olson, president, chairman and founder of DEC, 1977