|
|
sybperl-l Archive
Up Prev Next
From: Mike Reilley <mreilley at clc dot cc dot il dot us>
Subject: Re: ct_sql error ??
Date: Oct 8 1998 3:16PM
My apologies to the list, as Craig pointed out this was nothing more than a
typo.
it in fact should have been $X-> not X->
Thanks for the help and I will try to learn how to type.
At 02:23 AM 10/7/98 -0600, you wrote:
>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 ......
Mike Reilley
DBA
Data Center
College of Lake County
19351 West Washington St.
GraysLake, IL 60030-1198
Voice 708-499-2878
Voice 847-543-2858
Voice 847-223-6601 Ext 2858
FAX 847-543-3858
Internet mreilley@clc.cc.il.us
WEB www.clc.cc.il.us
===========================================================
It's not a BUG, it's a DESIGN FEATURE !
Berst's Bywords: It's not hard to meet expenses. They're everywhere.
===========================================================
|