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: Ronald Page <Ron dot Page at asu dot edu>
Subject: ct_callback
Date: Dec 29 1997 8:49PM

I'm attempting to use CT_CALLBACK to register a callback routine for
CS_CLIENTMSG_CB and CS_SERVERMSG_CB.  This is an attempt to get return
code information for a failed trigger.  The problem is that my callback
routines never get called.  Here are the statements I use (which
apparently have no error):

$old_client_cb = ct_callback(CS_CLIENTMSG_CB, "clientCallback");
$old_server_cb = ct_callback(CS_SERVERMSG_CB, "serverCallback");

I also have two subroutines named "clientCallback" and "serverCallback".
The code in those subroutines is similar to the example in the SybPerl
CTLib documentation.

Here is an example error message I get (ti_po_address is a Transact SQL
stored procedure called for INSERTs and uses "raiserror" to report
results.):

Server message:
Message number: 30002, Severity 16, State 1, Line 33
Server 'DEVELOP2_SS'
Procedure 'ti_po_address'
Message String: Parent does not exist in "PO_ACCOUNT". Cannot create
child in "PO_ADDRESS".