Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: [Fwd: SybPerl CtLib Questions]
Date: Mar 26 2003 6:04PM

On Mon, 2003-03-24 at 07:52, Michael Peppler wrote:
> Forwarded to the sybperl-l mailing list.
> -----Forwarded Message-----
> From: Chito Domingo (DSLWN) 
> To: '' 
> Subject: SybPerl CtLib Questions
> Date: 24 Mar 2003 16:16:03 +1200
> Hi Michael,
> Just a couple 'how to' questions on CtLib.  
> 1.    How do you make an insert of text/image column from one db instance to
> another?  The manual gave an example in using DBLib but not on CtLib.

Meaning fetch a text value from one connection, and insert it via
another connection?

There is some information on using ct_get_data() and ct_send_data() in
the manual, specifically in the "Using ct_get_data() and ct_send_data()
to do raw TEXT processing" section.

> 2.    How to capture the the callback attibutes in 'srv_cb'?  I'm
> particulary looking on the SQL statement passed on the callbakc function.

The current SQL statement isn't available in Client Library. I suppose
that Sybase::CTlib could save it in the database handle, but at the
moment it doesn't.

You could fairly easily write your own module that inherits from
Sybase::CTlib and overrides the normal ct_execute() and ct_sql() methods
and captures the SQL statement before executing the request...

Michael Peppler                              Data Migrations, Inc.       
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions -