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: =?ISO-2022-JP?B?GyRCOzNFRBsoSiAbJEJNNRsoSg==?= <hyamada at mtec-institute dot co dot jp>
Subject: Null Value problem with Sybase::BLK
Date: Jun 18 2002 2:39AM

Hi, I'm new to the mailing list.

I am in trouble with Sybase::BLK.
It's concerned with Null values.

Here is an exmaple,
which BULK-inserts the following three rows by blk_rowxfer().


------------------------------------
  id, status, col1, col2, col3
------------------------------------
   0,     OK,    100,    100,    100
   1,     OK,      0,      0,      0
   2,     NG,       ,       ,
------------------------------------

Rows with id = 0,1 are normally inserted,
while the row id = 2 is inserted with zeros, not with NULLs, on col1,2,3.


------------------------------------
  id, status, col1, col2, col3
------------------------------------
   0,     OK,    100,    100,    100
   1,     OK,      0,      0,      0
   2,     NG,      0 ,     0,      0	<== ZEROS!
------------------------------------

Col1,2,3 are all of integer type.

I  understand that the undef values in Perl are converted into null values in Sybase::BLK,
aren't they?

Please instruct me how to solve the problem.

I have appended a perl script which demonstrates the above problem.
The problem occured in an evironment:

OS : AIX 4.3
Perl :5.005_03
Sybase:11.9.2.3(AIX)
Open Client:11.1.1
sybperl:2.1401

Thank you in advance!!

Hiroshi Yamada