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: Michael Peppler <mpeppler at peppler dot org>
Subject: Sybase::CTlib implementation of BLK routines and NUMERIC() values
Date: May 18 2004 12:42PM

I mentioned in a message a week or so ago that ASE 12.5.2 has made a
modification to the blk_rowxfer() where trying to send a NUMERIC() value
that is wider than the target column will fail. In previous versions of
OpenClient the value is silently truncated to fit - for example trying
to load 123.456 to a NUMERIC(6,2) will store 123.45 when using an older
version of OpenClient, but will fail with OCS 12.5.1 ESD#2 (which is
what ships with ASE 12.5.2).

I checked to see what Sybase's bcp program does, and it will fail the
row if there is a NUMERIC() that gets truncated, both with current and
older versions of OpenClient.

This leads me to think that the new behavior is the right one - if the
data getting loaded doesn't fit the row shouldn't be allowed to go
through.

I'd like to hear from those of you that use the blk_xxx() API to see
what the consensus on this issue is.

Thanks!

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html