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: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: Bulk-Loading routines in DBD::Sybase
Date: Jul 13 2004 1:52PM

Michael Peppler wrote:

>my $sth = $dbh->prepare('insert the_table values(?, ?, ?, ?, ?)",
>                        syb_bcp_attribs => { identity_flag => 0,
>                                             identity_column => 0 });

>The number of placeholders *MUST* be the same as the number of
>columns in the target table. The *order* of the columns must be the
>same as the physical order of the columns on the server (i.e. any
>column list in the INSERT statement will be ignored).

This seems dangerous.  Can you enforce that no column list is given?

>The "identity_flag" attribute should be set to 1 if your source data
>includes values to be inserted to an IDENTITY column (i.e. similar to
>the -E flag for bcp).

What happens if this or identity_column is incorrect?

>AutoCommit is ignored for this operation (it is always off).

It might be safer to require AutoCommit to be off.  OTOH, I suppose it
is possible to have an open transaction for 'normal' updates but to do
an autocommitted bcp operation in the middle?

-- 
Ed Avis