|
|
sybperl-l Archive
Up Prev Next
From: Roleigh Martin <rol at uhc dot com>
Subject: Re: what is the Perl DBI (for Sybase) equiv. to Sybperl DBROWS
cmd?
Date: Dec 7 2001 2:38PM
Thanks Michael!
Here is what I did since your email - I created a kornshell job to convert
the docs to PDF and I FTPed them to my windows computer and created icons
pointing at them so I can bring them up with Adobe Acrobat reader.
The two files are these sizes:
17732 Dec 06 17:21 DBD_SYBASE.pdf
66492 Dec 06 17:23 DBI.pdf
if you don't object I can post them to the list -- but I won't until hearing
from you first. I don't know what the list rules are for attachments.
Here is how I converted them to pdf though (we have Unix adobe acrobat 3.0
installed on our AIX box):
cat perlhelp.ksh
#!/bin/ksh
cd
cd doc
echo perldoc DBD::Sybase
perldoc -t DBD::Sybase > DBD_SYBASE.txt
portrait10_pdf DBD_SYBASE
echo perldoc DBI
perldoc -t DBI > DBI.txt
portrait10_pdf DBI
=========================================================
cat portrait10_pdf
#!/bin/ksh
export FN=`echo $1 | cut -f 1 -d
.`
enscript -p - -B -fCourier10 $FN.txt | distill -compresstext on -asciipdf
off > ${FN}.pdf
if [ -s ${FN}.pdf
]
then
rm
$FN.txt
else
echo portrait10_pdf script failed for some flukey reason -- check it
out for ${FN}.txt and ${FN}.pdf
fi
if [ $# -gt 1 ];
then
shift
1
portrait10_pdf
$*
fi
At 03:58 PM 12/6/2001, Michael Peppler wrote:
>Roleigh Martin writes:
> >
> > One question raised was -- what is the equivalent PERL DBI way to code
> > (convert)
> > use of the old Sybperl DBROWS command especially for when used against the
> > results of a select command. DBROWS would return basically TRUE or
> FALSE if
> > rows were returned from a select command without having to read
> through the
> > rows if you chosed not to.
>
>There is no equivalent, really. $sth->execute will return TRUE if no
>error was found, and you then have to call $sth->fetch_*() to see if
>there were any rows.
>
> > Second question, where does the Perl DBD/DBI documentation get
> installed on a
> > unix box typically -- we've been doing our coding of perl dbi just
> straight
> > from
> > the oreilly perl dbi book and we're curious if the latest version of perl
> > dbd/dbi
> > has more commands or better documentation on various perl dbi/dbd
> commands.
> > A pointer to a directory name on your box will do just fine (no need
> to provide
> > box name or usercode).
>
>In general running "perldoc DBI" or "perldoc DBD::Sybase" should give
>you the necessary information.
>
>Michael
>--
>Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
>mpeppler@peppler.org - mpeppler@mbay.net
>International Sybase User Group - http://www.isug.com
|