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: sybase on windows xp : perl query hanging
Date: Sep 23 2004 6:39AM

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


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 Peppler                              Data Migrations, Inc.             
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions -