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: Ron Ohmer <rohmer at yahoo dot com>
Subject: Re: How to get text file from a bcp out.
Date: Jun 29 1999 8:37PM

Carefully...

--- "Tezgiden, Tekin" 
wrote:
> 		Hi,&
> 
> 		I try to run following code to bcp out some data.
> However
> the data in the file like a binary. &
> 		My first question is how can I bcpout the data in
> text
> format and "|" delimited? &
> 		My second question is, the output of following
> code contains
> error. How can I avoid such errors? &
> 		&
> 		Script: &
> 		use Sybase::DBlib;&
> 		&
> 		$USERNAME=$ENV{'USERNAME'};&
> 		$DBNAME=$ENV{'DBNAME'};&
> 		$PASSWORD=$ENV{'PASSWORD'};&
> 		&
> 		require "/export/home2/autoreg/util/sybdb.pl";&
> 		&
> 		&BCP_SETL(TRUE);&
> 		 $sybdb::sybase_error = 0;&
> 		 $dbc = new Sybase::DBlib $USERNAME, $PASSWORD ;&
> 		 $dbc->bcp_init("myTable","myfile","errFile",
> DB_OUT );&
> 		&
> 		$status=$dbc->bcp_exec;&
> 
> 		output: &
> 		DB-Library error:&
> 		        1000 rows successfully bulk-copied to
> host-file.&
> 		DB-Library error:&
> 		        1000 rows successfully bulk-copied to
> host-file.&
> 
> 		Thanks..&
> 		Tekin Tezgiden&
> 

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com