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: Jamie Belanger <jamie_belanger at globalcrossing dot com>
Subject: RE: trapping errors with db-lib
Date: Mar 13 2000 9:48PM

Ah, message TRAPPING (too much e-mail scanning)...

Jamie Belanger 
Sys Admin, Global Crossing 
(319) 298-1489 or ext. 489 
 

 

-----Original Message-----
From: Jamie Belanger [mailto:jamie_belanger@globalcrossing.com]
Sent: Monday, March 13, 2000 3:33 PM
To: SybPerl Discussion List
Subject: RE: trapping errors with db-lib



It's incredibly easy to install client and server callbacks if you're using
CTlib, but I have no idea how that's accomplished in DBlib... 

Jamie Belanger 
Sys Admin, Global Crossing 
(319) 298-1489 or ext. 489 
 



-----Original Message----- 
From: Troy Taylor [ mailto:ttaylor@JCLLC.COM  ] 
Sent: Monday, March 13, 2000 3:15 PM 
To: SybPerl Discussion List 
Subject: trapping errors with db-lib 


I have spent hours looking through the Sybperl DBLib docs and cant figure 
out how to trap errors like this: 

Msg 102, Level 15, State 1 
Server 'sybaseserver', Line 4 
        Incorrect syntax near 'searchterm'. 
DB-Library error: 
        General SQL Server error: Check messages from the SQL Server. 

This error causes my script to crash.  I am doing error trapping using 
$status = $dbh->dbretstatus; BUT it doesnt seem to trap the above kinds of 
errors.  My sql syntax is built on the fly, so I need to trap the above 
types of errors if they occur. 

Thanks for any help in advance, Sorry if this question has been covered 
before.  If it has been covered before any points to the correct reference 
would be greatly appreciated! 

Thanks again! 

Troy D. Taylor