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: "Milan Mikic" <Milan dot Mikic at gartmore dot com>
Subject: Error handling
Date: Mar 25 1998 12:28PM

Dear All,

Here is a peace of code trying to use example of error/message handling
supplied with Sybperl 2.03. Does anyone have an idea why it does not print
out any error messages, knowing that table dfdfdf does not exist in the
database.

Many Thanks

Milan

use Sybase::DBlib;

#
# Install error and message handler
#
require "sybutil.pl";
# Connect to source
#
$sybc_source = new Sybase::DBlib("ReadOnly", "readonly", "lonntss002");

if (!$sybc_source)
{
    print "Unable to connect to server.\n";
    exit 1;
}

$ret = $sybc_source->dbuse("master");
if ($ret != 1)
{
     print "No master !??!!\n";
}

$ret = $sybc_source->dbcmd("select * from dfdfdf");
$ret = $sybc_source->dbsqlexec();




=============================================================================
Gartmore Investment Management plc is an appointed representative of
Gartmore Investment Ltd (GIL) which is regulated by IMRO and the
Personal Investment Authority. GIL represents only the NatWest and Gartmore
Marketing Group for life assurance, pensions, unit trusts, other regulated
collective investment schemes and investment services.