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 MBAY dot NET>
Subject: Re: bcp parameters
Date: Sep 19 1997 5:52PM

Cliff Larsen (Pathfinder) wrote:
> 
> I am working on a script to perform bulk copy operations
> in/out of database tables.
> 
> As part of my bcp script, I'd like to utilize the bcp parameters
> "-E" (explicitly specify identity column values) and "-A" (packet size).
> I haven't found any information on the use of bcp parameters in the
> Sybperl man pages or the Open Client DB-Library/C Reference Manual.
> 
> Does the Sybperl BCP library allow for the use of bcp parameters?
> If so, how?

I looked around in sybooks, and it seems that the -E flag can only
be set with a language call.

So you need to do something like

$dbh->sql("set identity_insert off");

before you run your bcp operation.

For the packet size this can be set via DBSETLPACKET():

DBSETLPACKET($packet_size);

This must be called before you call new Syabse::BCP or new Sybase::DBlib

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler