Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
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 2:14PM

Michael Peppler wrote:

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

>>Can you enforce that no column list is given?
>Probably. For now I just wanted the minimal parsing needed to get the
>table name...

I don't know how DBI handles these things but I wonder if

    $sth = $dbh->prepare(syb_bcp('the_table'), ...)

might not be better.  syb_bcp() can return some kind of magic string
or blessed reference which is recognized by DBD::Sybase as a bcp
operation.  This gets you away from pretend SQL parsing.

>>>AutoCommit is ignored for this operation (it is always off).
>And you *can't* do an autocommitted bcp
>operation - all bcp operations require an explicit call to
>$dbh->commit() in order to work.

In that case why not give an error if AutoCommit is on?

Ed Avis