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():
This must be called before you call new Syabse::BCP or new Sybase::DBlib
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler