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: "Matthew O dot Persico" <mpersico at bestweb dot net>
Subject: Re: any thoughts? (fwd)
Date: Mar 11 1999 2:55AM

If I remember correctly (it' sbeen a long time since I've used DBLib in
C or C++), one of the first things you are required to do when using
DBlib is call dbinit(). Well, in earlier versions of DBLib that mihgt
have been a noop, but certainly not in the the 11x series, I think. I
bet that the require calls dbinit() somewhere and that screws up the
connections already in RW.

Some things to try from a diagnosis approach:

Step 1 - Look at the code for Sybase::DBLib and see if it does call
dbinit(). Make sure you look at the XS code too.

Step 2 - Write a little 'C' program that calls dbinit(), logins in, runs
a query, gets results then calls dbinit again w/o an intervening close
and executes another query. Then go back and try a thrid query on the
first handle. If it dies, then you know what the problem is.

Step 3 - If that is the problem, you may be able to get around it by:

a) calling the perl interp and the require line as early as you can,
right after the RW library calls dbinit internally. Without any open
connections, you might get away with two consecutive dbinit calls.

b) patch Sybase::DBLib to NOT call dbinit (Mike Peppler's gonna hit the
roof when he reads THAT suggestion!)

c) Switch to DBI and DBD::Sybase which are ct-lib based and therefore
should not conflict with RW.

d) Switch RW to using ct-lib underneath.

e) punt :-)

Let me know how you make out.

Matthew O. Persico