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: Michael Burstin <mikeb at davox dot com>
Subject: DBI, WinNT, interfaces file
Date: Aug 24 2000 8:36PM

I have been running into a problem with some perl scripts that I have
been writing using DBI/DBD-Sybase under WinNT.

I am running ActivePerl 522, DBI 1.13.1, DBD-Sybase .22

In my scripts, I open several DB connections, but never have any
connections open simultaneously.  In some of the earlier connections,
I need to specify a different sql.ini file, using the following
syntax:  

 $dbh = DBI->connect("DBI:Sybase:server=$server;interfaces=$iniFile;database=master",
			  $loginInfo->{USER}, $loginInfo->{PASSWORD},
			  {PrintError => 0, RaiseError => 0 });

where $server, $iniFile and $loginInfo are passed into a subroutine.

This works fine.  The problem that I am running into is, when I go to
do another DBI->connect (the initial connection has already gone out
of scope, and I even tried adding a $dbh->disconnect), this time, not
specifying an interfaces file, I am unable to connect (get a Server
Name not found from Sybase).  If I specify the default location for
the sql.ini file ($ENV{SYBASE}\\ini\\sql.ini), my connections work
fine.

It appears that something (not sure what, OpenClient, DBI, DBD-Sybase) 
is caching that interfaces file usage.  Is this correct?  Is this a
bug in my script, or something in one of these other items?  Any help
is appreciated (I can send more code, if necessary, but don't want to
clutter the list too much).


-- 
Those who do not understand UNIX are  ++   Linux, The Ultimate
doomed to reinvent it, poorly.        ++  Windows Service Pack
			(quotes taken from /.)
A computer without Microsoft is like ice cream without ketchup

Michael Burstin				mikeb@davox.com