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: Stephen dot Sprague at morganstanley dot com
Subject: Re: Help witb BCP
Date: Jul 5 2001 7:42PM

Michael must have the day off. Lucky guy!  

My 2 cents.

1) all this is is bcp telling you that it truncated a character field to
   make it fit in the corresponding column. It's an annoying  warning  -
   but nonetheless only a warning. The row is transferred.

2) there you go! I tell no lies.

3) okay.

4) Well. I can't vouch for the onager  factor  but  that  seems  like  a
   reasonable action to take not knowing otherwise.

5) Now you've done it. More columns? strange.

Conclusion. If you dare use Sybase::Xfer.pm it'll report  the  offending
row/column that is too long. Otherwise, I think you can tell  sybase  to
put the offending rows in an error file (-e switch) then you'll have  to
eyeball the character data to see which column got truncated.

Cheers,
Steve

On 5 Jul 2001 @ 6:12pm, an entity claiming to be Sai  N scribbled:

sainar :Dear Sybperl gurus,
sainar :
sainar :I have Perl 5.6 running on NT and am using Sybperl 2.13. My Sybase version is 12.0 installed on my very own machine.
sainar :
sainar :I have compiled and installed sybperl and am trying to use its BCP facility from within Perl.
sainar :
sainar :What is happening is the following: 
sainar :1) I get a slew of DB Library warnings as follows:
sainar :"DB-Library error: Attempt to bulk-copy an oversized row to the SQL Server."
sainar :
sainar :2) I check the database and see that all the rows have actually been inserted.
sainar :
sainar :3) I ran in debug mode and put in a call back and noticed that all of the rows have a  in them at the end. (I used the default RECORD_SEPARATOR)
sainar :
sainar :4) Thinking that I was an ass for not having remembered that I am on an NT box, I changed the RECORD_SEPARATOR = '\r\n'. 
sainar :
sainar :5) Now I got the following error: "More columns passed to bcp_sendrow than were allocated with bcp_meminit at d:/Pe
sainar :rl/site/lib/Sybase/BCP.pm line 512,  chunk 1."
sainar :
sainar :So please help me gurus. What am I doing wrong? I would prefer to load without any spurious errors. 
sainar :
sainar :Sai
sainar :
sainar :
sainar :
sainar :____________________________________________________
sainar :Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm
sainar :
sainar :
sainar :