http://qs321.pair.com?node_id=706222

ndixon has asked for the wisdom of the Perl Monks concerning the following question:

I'm tearing my hair out on this one.

I'm trying to build a simple Catalyst CRUD application using DBIx::Class 0.08010 and DBD::Sybase connecting to a SQL Server 2005 instance.

I have other (back-end) Perl applications which can select/insert/update/delete using plain old DBI without any problem, so I know that DBD::Sybase is set up correctly.

And in my Catalyst app I can perform select queries (list, search) with no problems either.

But when I try to insert a new record via DBIx::Class::ResultSet::create, I get an error from DBD::Sybase::db like this:

DBI Exception: DBD::Sybase::db ping failed: Can't call ping() with active statement handles at /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/Schema.pm line 954

Has anyone else encountered this?

As far as I can tell, this indicates statement handles left unfinished, but since DBIx::* is doing all the work, I can't tell where the problem is.

Strange thing is, the inserts are getting through to the db - the error seems to come afterwards when DBIx::Class tries to get the last_insert_id.

If anyone else has managed to use DBIx::Class to update a SQL Server 2005 database without this error, I'd appreciate knowing how you did it.

  • Comment on DBIx::Class and SQL Server: Can't call ping() with active statement handles ?

Replies are listed 'Best First'.
Re: DBIx::Class and SQL Server: Can't call ping() with active statement handles ?
by mpeppler (Vicar) on Aug 27, 2008 at 13:20 UTC
    I've never used the DBIx:: module(s), so I don't have any real advice - other than checking in DBIx::Class::Schema line 954 to see why this is calling ping() - off hand I don't think that DBD::Sybase does this directly when last_insert_id() is called.

    Michael