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: "Damodharan, Venkat (VDamodharan)" <Venkat dot Damodharan at dresdnerrcm dot com>
Subject: RE: BCP function.
Date: Jan 27 1999 7:03PM

Hi guru's

I have to write an Ftp function to run from NT/UNIX.

The example table has 2 columns.  The data is comma delimited.

I am using CTLib.pm not DB Lib.

I have tried to use the BCP library supplied by sybperl.  As given in the
code, I have done the
following, in my code:  (I am trying to run from NT).

	use Sybase::BCP;
	
	$bcp = new Sybase::BCP $DPOP{SQL_USER_NM}, $DPOP{SQL_PASSWD},
$DPOP{SQL_SVR_NM}, "Dpop Application";

	$DataFile = "$DPOP{SRC_FILE_PHYS_LOC_TXT}\\$DPOP{SRC_FILE_PHYS_NM}";
	$OutFile  = "$DPOP{SQL_DB_NM}..$DPOP{SQL_TBL_NM}";

	$bcp->config(INPUT => $DataFile,
		OUTPUT => $OutFile,
		SEPARATOR => ','
		);
	$bcp->run;

	I am getting the DB library error:
			Column Number out of range.

	How do I solve this?.

	Also, I have the message and error handlers (msg_cb & syb_cb).  How
do I set them for this process>


Regards

Venkat