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: "Goyal, Prashant" <Prashant dot Goyal at gs dot com>
Subject: RE: Info needed
Date: Jun 22 1999 4:40PM

I tried to use the following piece of code

#!/opt/local/bin/perl5
use Sybase::DBlib;
$sybaseLogin=Sybase::DBlib->dblogin(pcsgloss, pcsglossQ, LNPCQSS01);
$sybaseLogin->dbuse($trd_dbproc, PCSa_trd_Q1);

It gives me the following errormsg:
Usage: Sybase::DBlib::dbuse(dbp,db) at prash_test2 line 7.

Is the syntax wrong ?

Thanks,
Prashant
> -----Original Message-----
> From:	Goyal, Prashant 
> Sent:	Tuesday, June 22, 1999 11:35 AM
> To:	'SYBPERL-L@listproc.net'
> Subject:	RE: Info needed
> 
> Thanks..
>  I will try to re-write the scripts
> 
> 
> 	-----Original Message-----
> 	From:	Michael Peppler [SMTP:mpeppler@peppler.org]
> 	Sent:	Tuesday, June 22, 1999 10:18 AM
> 	To:	SybPerl Discussion List
> 	Subject:	Re: Info needed
> 
> 	Goyal, Prashant writes:
> 	 > Hi,
> 	 > 
> 	 >   I am glad to find your site. 
> 	 > 
> 	 >  My issue:
> 	 >    It has been told to us that sybperl is non-Y2k Compliant . 
> 
> 	Who told you that?
> 
> 	 > So All the
> 	 > perl scripts are asked to be changed to Sybase DBlib. 
> 	 > A sample format of our scripts are :
> 	 > require "sybperl.pl";
> 	 > require "Sybperl_path.pl";
> 	 > 
> 	 > $dbuse.....;
> 	 > &dbcmd..;
> 	 > &dbsqlexec...;
> 	 > &dbresults ...;
> 	 > 
> 	 > Can you please let me know if the statement that sybperl being
> used in the
> 	 > above format is non -compliant. If so , then what is the best way
> to do it.
> 	 > Is it that if i change just the require statement as " use
> Sybase::Dblib"
> 	 > all the functions work. Please any pointers to the above would be
> 	 > appreciated.
> 
> 	Your scripts may actually work out of the box, as long as you always
> 	use the &dbXXX(...) form (ie, always include the ()), and that you
> 	always require sybperl.pl.
> 
> 	However, if you don't have too many scripts I would recommend that
> you 
> 	re-write them to the Sybase::DBlib format, which would be
> 
> 	use Sybase::DBlib;
> 	require 'sybutil.pl';   # for error handlers
> 
> 	$dbh = Sybase::DBlib->dblogin($user, $pwd, $server);
> 	$dbh->dbuse(...);
> 	$dbh->dbcmd(...);
> 	$dbh->dbsqlexec();
> 	$dbh->dbresults();
> 
> 	etc...
> 
> 	See also the information in the sybperl man page, and on my web page
> 	(see my .sig below).
> 
> 	Michael
> 	-- 
> 	Michael Peppler         -||-  Data Migrations Inc.
> 	mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
> 	Int. Sybase User Group  -||-  http://www.isug.com
> 	Sybase on Linux mailing list: ase-linux-list@isug.com