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: Peter Brown <pbrown at infocomp dot com>
Subject: RE: sybase on windows xp : perl query hanging
Date: Sep 23 2004 7:01AM

brilliant ... works fine now ... thanks for your time and patience .. I
didn't want to bother you again after your efforts yesterday however I'm
very appreciative of you taking the time to help after finding my group
post.... pete

-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Thursday, 23 September 2004 4:40 PM
To: pbrown@infocomp.com; sybperl-l@peppler.org
Subject: Re: sybase on windows xp : perl query hanging


On Wed, 22 Sep 2004 22:05:19 -0700, Peter Brown wrote:

> Not sure if I should be posting this here or on a perl group ...
> anyhow here is the problem ...
> 
> I've just installed Sybase, Perl , DBI, DBD::Sybase on winXP box
> ...isql works fine from command line however simple perl query just
> hangs ... has anyone had similar experiences ? I've been helped by
> Michael Peppler in relation to installing DBD however after successful
> DBD install still having problems... some detail is provided below...



> System Administrator (SA) role.
> 1> dbcc sqltext(25)
> 2> go
> SQL Text: select @@version
> DBCC execution completed. If DBCC printed error messages, contact a
> user with

Ah.

I'm not sure why it hangs, but there is a problem with the ct_cancel()
call in some cases. DBD::Sybase fetches the @@version from the server
during the DBI connect() call to enable/disable certain behaviors, and at
the end of that call executes a $sth->finish, which maps to ct_cancel()
by default.

If you change your connect() call and add syb_flush_finish=>1 in the
attributes you should be fine:

$dbh = DBI->connect("DBI:Sybase:$server",
                    $username,$pw,{RaiseError => 1, syb_flush_finish=>1});

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html