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: abe dot crabtree at citicorp dot com
Subject: Wrong object type in Server message callback
Date: Aug 8 2002 4:11PM


We have a package that ISA Sybase::sybperl, which installs callback functions:

  Sybase::Simple::ct_callback(CS_SERVERMSG_CB, \&serverCBH);


and 

sub serverCBH
{
  my ($dbh, $number, $severity, $state, $line, $server, $proc, $msg) = @_;
.
.



This is fine for the most part, but it seems that if a message has extended 
error information (e.g. attempting to insert NULL into a NOT NULL column, or 
violating a unique index,) $dbh does not reference our derived class, rather 
Sybase::CTLib (I can see this by using the ref function.)

If I add

  bless $dbh, "OurConnectionClass" ;


all is well.


Can anyone shed any light?

Thanks for any help,

Regards,

Abe Crabtree