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: Dan Johansson <Dan dot Johansson at mrmusic dot de>
Subject: Problem executing dbcc with CTLib
Date: Feb 26 1999 8:21AM

Hi SybPerlers,

I'm trying to execut a dbcc comand with CTLib.
The problem I'm having is that I'm not able to capture the output from the
dbcc comand, so am not sure if the command executes or not.

Here's a part of my perl-script

$cmd="dbcc checktable(table1)" ;

print LOG $cmd . ":\n" ;
($ret=$dbh->ct_execute($cmd))==CS_SUCCEED or die "Can't execute '$cmd' : $!\nret=$ret\n";
$restyp=0;
while(($ret=$dbh->ct_results($restype))==CS_SUCCEED)
{
    next unless $dbh->ct_fetchable($restype);
    while ( @data=$dbh->ct_fetch() )
    {
        foreach (@data)
        {
            print LOG ;
            print LOG "\n" ;
        }
    }
}

TIA
//Dan
--
======================================================================
Dan Johansson                     Tel   :+49-(0)89 / 74 11 46 25
Mr Music Production GmbH          Fax   :+49-(0)89 / 74 11 46 46
Fuerstenriederstr. 279a           mailto:Dan.Johansson@mrmusic.de
D-81377 Munich
Germany             *** Don't drink and root! ***
----------------------------------------------------------------------
         This message is printed on 100% recycled electrons!
======================================================================