Re: sybase on windows xp : perl query hanging

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
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...

<snip>

> 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.
[email protected]                       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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.