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: "Prajapati, Dattu" <Dattu dot Prajapati at FMR dot COM>
Subject: Sybperl sybase::bcp - Question.
Date: Jul 17 2000 7:48PM

Hi Michael ,
I was looking at wonderful document at
http://www.cs.indiana.edu/hyplan/kishkov/Work/sybperl.html URL. It's very
useful. Thanks for developing that documents.

I am having one problem using Sybase utility BCP. I will appreciate if you
can help me out.

My code is similar to following code. 

I am trying to insert in to one table where one field contain text field. I
am getting following errors.

*	after this command bcp_sendrow returns error message: 'DB-Library
error: Attempt to bulk-copy an oversized row to the SQL Server.' for each
row added-probably due to length of text field, although all information
seems to be loaded correctly

I am able to see all data loaded in table without any problem. Should I
ignore error message? Is there any way I can get rid of that? 

Thank You,

Dattu


Table Definition.
	CREATE TABLE dbo.INVPROF 
	(
	    fund_code char(10)  NOT NULL,
	    fund_name char(100) NOT NULL,
	    text      text      NOT NULL
	)




Code. 

   &BCP_SETL(TRUE);
   $dbh = new Sybase::DBlib $User, $Password;
   $dbh->bcp_init("test.dbo.t2", '', '', DB_IN);
   $dbh->bcp_meminit(3);   # we wish to copy three columns into
                           # the 't2' table
   while(<>)
   {
        chop;
        @dat = split(' ', $_);
        $dbh->bcp_sendrow(@dat);
        if((++$count % 100) == 0) {
                 $d->bcp_batch;
        }

   }
   $ret = $dbh->bcp_done;

Dattu Prajapati
Fidelity eBusiness
617-563-0359