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 peppler dot org>
Subject: blk_drop
Date: Mar 4 2002 8:52PM

Stephen.Sprague@MorganStanley.com writes:
 > Getting the error below on blk_drop. The obvious must  be  avoiding  me.
 > What am I doing wrong? I'm using 2.14 of Sybase::CTlib
 > 
 > code:
 >   use Sybase::CTlib;
 >   my ( $u, $p, $s, $a ) = qw/user pwd server app/;
 >   $dbh = Sybase::CTlib->new( $u, $p, $s, $a . '_T', { CON_PROPS => { CS_BULK_LOGIN => CS_TRUE } } );
 >   $dbh->blk_init( 'db..table', 1, undef, undef );
 >   $dbh->blk_drop();
 > 
 > error:
 >   Open Client Message:
 >   Message number: LAYER = (0) ORIGIN = (0) SEVERITY = (0) NUMBER = (0)
 >   Message String: STATE EVENT: blk layer: user error: Cannot call API blkdrop() from this state: initialized
 > 

That may be a bug in the sybperl code... The C API says that you call
blk_drop() to free the BLK descriptor. However I took a couple of
shortcuts, and I suspect that in the code above there is no BLK
descriptor that can be dropped.

There may also be some other state issues that aren't handled quite
right here because of the shortcuts...

I'll try to look at the code later and see if I can see what is
missing from the internal sybperl code that causes the error.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org           *or*          mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com