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: John_McCarthy at WellspringRes dot com
Subject: Connections
Date: Sep 28 1999 6:24PM

The sybperl doc for CTlib says (in part):
"....$dbh2 = $dbh->ct_cmd_alloc 
	Allocate a new CS_COMMAND structure. The new $dbh2 shares the
CS_CONNECTION with the original $dbh, so this is really only useful for
interleaving cursor operations...."
If I fork a child, one branch uses $dbh, the other uses $dbh2, and I send
different commands to each connection, will each branch get its correct
result set?
Also, the DBlib doc shows a command to set the database : $dbh->dbuse($db).
Does CTlib have an analogous feature?

Lastly, most of the examples shown apparently were run without benefit of
"-w" or  "use strict".  Can anyone tell me which connection variables ($db,
$restype, $dbh->ct_?????, etc.) need to be my'd, local'd, or ::'d?  (In my
case, I would like to open one connection in "main", then others in subs.)

John  McCarthy
Technology makes it possible for people to gain control over everything,
except over technology. -- John Tudor