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: "Craig Kickel" <ckickel at micron dot net>
Subject: Re: ct_sql error ??
Date: Oct 7 1998 8:23AM

Mike,

    Assuming it's not a typo in your message, then the line:

        @back  = X-> ct_sql("use HEPROD");
should be

        @back  = $X-> ct_sql("use HEPROD");
That is, you're missing the dollar sign.

    You should also test to make sure your database connection is valid.
Something like:

    if( $X )
    {
        @back  = $X-> ct_sql("use HEPROD");
    }

To really pick nits, you might as well drop the "@back =" portion as well.
No rows will ever be returned from the "use HEPROD" statement.  If there are
errors, the error handlers will be invoked.

    --Craig

-----Original Message-----
From: Mike Reilley 
To: SybPerl Discussion List 
Date: Tuesday, October 06, 1998 8:54 PM
Subject: ct_sql error ??


Hi All,

I am new to SYBPERL obtained my copy from ACTIVESTATE

the following code gives me the following error:

#!/usr/local/bin/perl

    use Sybase::CTlib;

    ct_callback(CS_CLIENTMSG_CB, \&msg_cb);
    ct_callback(CS_SERVERMSG_CB, "srv_cb");
    $uid = 'Mikey';                 $pwd = 'XXXXXX'; $srv = 'F50_SYBASE';

    $X = Sybase::CTlib->ct_connect($uid, $pwd, $srv);



     @back  = X-> ct_sql("use HEPROD");

ERROR:

  Can't locate object method "ct_sql" via package "X" at ......