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: DBlib error handling
Date: Oct 30 1998 10:19PM

Scott D Urban writes:
 > 
 > 
 > I'm having trouble understanding the error handler in DBlib.  I am
 > expecting one of the handlers to get called in this (or any other) error
 > scenario.  Can someone tell me what I'm doing wrong?

I don't know - your little script definitely triggers both the message 
handler and the error handler here. I added a print "@_\n" in both
handlers, and here's what I get:

kiruna (2:18pm):3 > perl err2.pl
+++++++++  in message_handler  +++++++++++++
 5701 2 0 Changed database context to 'master'.   1
+++++++++  in message_handler  +++++++++++++
 5703 1 0 Changed language setting to 'us_english'.   1
+++++++++  in message_handler  +++++++++++++
Sybase::DBlib=HASH(0x135ed8) 137 2 15 Must declare variable '@@getdat'.   1
+++++++++  in error_handler ++++++++++++++
Sybase::DBlib=HASH(0x135ed8) 5 20018 -1 General SQL Server error: Check messages from the SQL Server. 


Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com