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: arthur at puma dot mt dot att dot com (Arthur Goldstein)
Subject: RE: DBlib phased out?
Date: Mar 9 2000 6:45PM

Well, I don't currently use ctlib or dblib but if ctlib were modified
to list the buffer like dblib that would be nice.

Overloading ctlib was a possibility but was too much
work when dblib has the buffer and the only advantage of ctlib for me
was that dblib was going to go away.

Setting up commands in variables is fine.  Problem was that I wasn't
doing most of the coding. Plus most of the use of the buffer
was in the error handler.  When that is called I'm not sure what's in scope
and it is easy to get the buffer from the dblib method.

Thanks for the responses.

Arthur



>From owner-SYBPERL-L@list.cren.net Wed Mar  8 11:22:27 2000
From: Jamie Belanger 
To: SybPerl Discussion List 
Subject: RE: DBlib phased out?
Date: Wed, 8 Mar 2000 10:20:00 -0600 
MIME-Version: 1.0
X-Listprocessor-Version: 8.2.09/990901/11:28 -- ListProc(tm) by CREN
X-Status: $$$$
X-UID: 0000000469

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BF891A.272336FC
Content-Type: text/plain;
	charset="iso-8859-1"

This may be overly simplistic, but it's very easy to just store the SQL
command that you're using in a variable. I exclusively use CTlib, and simply
place my commands in $SQL1, $SQL2, etc. 

It basically serves the same purpose as a buffer without being dependant
upon the CTlib module itself. (or perhaps not ;)

Jamie Belanger
Sys Admin, Global Crossing
(319) 298-1489 or ext. 489 




-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Wednesday, March 08, 2000 9:16 AM
To: SybPerl Discussion List
Subject: Re: DBlib phased out?


Arthur Goldstein writes:
 > The key reason I used db-lib over ct-lib was that db-lib stored the
 > buffer that could show what sql was being sent to the database.  I
 > could not figure out a way to do that in ct-lib.  Does ct-lib have
 > a method for that?

No.

You could handle this on the client by overloading the ct_command()
and/or ct_execute() calls to store the command buffer in the $dbh for
later retrieval.

(and maybe Sybase::CTlib could be modified to do this for you...)

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