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

Sybase::Simple - A simplified API for Sybase::CTlib

This is a simplified API module that sits on top of the Sybase::CTlib module, and it is derived from the SybTools module that I wrote to go with the second article for the ISUG Technical Journal.
For example, you might have a query that you know returns a single scalar element:
my $data = $dbh->Scalar("select getdate()");
Neat, uh?
You can use similar calls to fetch a single row, array of rows, or execute SQL that doesn't return any data (updates/inserts).
For large queries you can create an iterator so that you can still process the rows one by one:
my $iter = $dbh->HashIter("select ... from large_table");
while(my $row = $iter->next()) {
    ... process the data in the row here ...
}
As Sybase::Simple "inherits" from Sybase::CTlib, you can still call all the methods in Sybase::CTlib if you want to.