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: Bahri Sofienne <sofienne dot bahri at bell dot ca>
Subject: Re: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybase project; need help
Date: Nov 13 1998 8:20PM

Bahri Sofienne wrote:
> 
> Hello,
> 
> I work with perl/sybperl to access a sybase database from the web. I
> would  like to know the difference between CTlib and Dblib and which one
> is more performant to use to acces sybase database under unix
> 
> Thanks for help
> 
> Bob Buehler wrote:
> >
> > Here are some links for PERL/CGI scripts. Hope they help.
> >
> >  http://www.sharewareguide.com/CGIGuide/cgiguide.asp
> >
> >  http://www.boutell.com/openfaq/cgi/
> >
> > Bob Buehler
> > State of Texas
> > Comptroller of Public Accounts
> > bob.buehler@cpa.state.tx.us
> > (512)463-4361
> >
> >
> > > -----Original Message-----
> > > From: owner-SYBPERL-L@listproc.net
> > > [mailto:owner-SYBPERL-L@listproc.net]On Behalf Of Roleigh Martin
> > > Sent: Thursday, November 12, 1998 4:05 PM
> > > To: SybPerl Discussion List
> > > Subject: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybase
> > > project; need help
> > >
> > >
> > > Hello,
> > >
> > > I just stumbled across the sybperl-listserv today and have looked
> > > at several of the last months of the archive.
> > >
> > > I am currently familiar with sybperl 4.0X (trying to upgrade to
> > > sybperl 5.0X) and I know the basics of HTML (I have my own web
> > > site of static pages at
> > > http://ourworld.compuserve.com/homepages/roleigh_martin which focuses
> > > on Y2k and the embedded systems threat to core infrastructures -- you
> > > might find it interesting -- I have published 23 some Y2k articles in
> > > the trade press).
> > >
> > > Anyway, at my "straight" job, I need to be able to do updates and
> > > selects against a Sybase database on unix from within a web page that
> > > goes against a unix-hosted web server (we use RS/6000 AIX computers).
> > >
> > > Can you give me some starters where to look for documentation, examples,
> > > etc?  I have never written a cgi script, so that is part of my task to
> > > learn too.
> > >
> > > I have worked with sybase SQL Server for about 6 years though.
> > >
> > > Thanks!
> > >
> > > Roleigh Martin
> > >
> > >
> > > ------------------------------------------------------------------
> > >   Roleigh Martin,M.A.            marti124@tc.umn.edu (home email)
> > >      http://ourworld.compuserve.com/homepages/roleigh_martin
> > >     ( easy to remember alias is: http://webalias.com/roleigh )
> > > (A Web Site that focuses on Y2k threat to Core Infrastructures)
> > >   5511 Malibu Drive, Edina MN 55436 (U.S. Mail Address--home)
> > >      612-992-4592 (work - 9a-6p, CST); 612-933-3092 (home)
> > >
> > >
> hello

i use CTlib to acess a data base, i want to use ct_sql("execute
$Stored_proc....."),
i have always this message error:

Not a HASH reference at /logiciels/sybperl/lib/site_perl/Sybase/CTlib.pm
line 895.

Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This
routine can be called only if the command structure is idle.
csmct4% vi yarab.pl

Do you have any comment about this.
the source code is:
#!/logiciels/perl/bin/perl

use CGI;
use Sybase::CTlib;


# Fill in your values here...

$DATABASE="";
$SERVER="TRAN";
$DBID="sa";
$DBPASSWORD="sy";
$STORED_PROC="sp_help";
$SP_ARGUMENTS="";


$query = new CGI({});

$db = new Sybase::CTlib $DBID, $DBPASSWORD, $SERVER, "Test.pl";

$resultArray = $db->ct_sql( "execute $STORED_PROC $SP_ARGUMENTS", undef,
TRUE );

print $query->header;

print $query->start_html(-title=>'SybPerl/CGI Tester',
                         -author=>'rootd@nowhere.com',
                         -base=>'true',
                         -BGCOLOR=>'white');







>   ------------------------------------------------------------------------
> 
>   Sofienne Bahri 
>   Directeur-CSR
>   Bell
> 
>   Sofienne Bahri
>   Directeur-CSR  
>   Bell
>   MONTREAL       Work: + 1 514 391 4114
>   QUEBEC         Netscape Conference Address
>                  Netscape Conference DLS Server
>   Additional Information:
>   Last Name    Bahri
>   First Name   Sofienne
>   Version      2.1