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: jrisley at nex-web4 dot corp dot fedex dot com (Jason Risley)
Subject: RE: problems with ct_execute
Date: Nov 27 1998 7:02PM

Michael,

I feel that menza must really wants me now... Thanks for pointing out the
obvious to me!!!

'sa' is not the name of the server, I just changed the pswd and srvr for the
posting....

Thanks for your assistance!!
Jason


> -----Original Message-----
> From: owner-SYBPERL-L@listproc.net
> [mailto:owner-SYBPERL-L@listproc.net]On Behalf Of Michael Peppler
> Sent: Friday, November 27, 1998 10:45 AM
> To: SybPerl Discussion List
> Subject: problems with ct_execute
>
>
> Jason Risley writes:
>  > I am having troubles with ct_execute in a cgi script within
> Apache 1.3.3 on
>  > NT. At the Command prompt, everything works just fine. But
> when I execute
>  > this via Apache as a cgi script, I get the the following
> returned to the
>  > browser:
>  >
>  > 
>  >
>  > I do not get any messages in Apache's error.log. Has anyone
> encountered this
>  > problem and/or know how to solve the situation?
>
> My guess is that the SYBASE environment variable isn't set right..
>
> BTW - is the server really called 'sa'?
>
> Michael
>
>  >
>  > Thanks
>  > Jason
>  >
>  > The following is my perl script....
>  >
>  > #!C:/sybperl/bin/perl.exe
>  >
>  > 	use CGI::Switch;
>  > 	use Sybase::CTlib;
>  >
>  > 	$uid = 'sa';
>  > 	$pwd = 'sa';
>  > 	$srv = 'sa';
>  > 	$charset = 'cp850';
>  >
>  > 	$! = 1;
>  > 	print "Content-type: text/html\n\n";
>  > 	print "\n";
>  >
>  > 	$db=Sybase::CTlib->ct_connect($uid, $pwd, $srv, $charset);
>  > 	$db->ct_execute("select uid, name from sysusers");
>  > 	while ( $db->ct_results($result) == CS_SUCCEED) {
>  > 	    next unless $db->ct_fetchable($result);
>  > 	    while ( ($uid, $name) = $db->ct_fetch ) {
>  >       	  print "$uid - $name\n";
>  > 	    }
>  > 	}
>  >
>  > 	print "\n";
>  >
>  >
>
> --
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
> Int. Sybase User Group  -||-  http://www.isug.com
> Sybase on Linux mailing list: ase-linux-list@isug.com
>