jfroebe has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Does anyone know if DBIAgent is able to handle persistant connections? It doesn't appear so even when limiting parallel queries to 1 ... I'm able to create temporary tables (#table) easily but when I attempt to drop the #table it is not there (temporary tables are automatically dropped when the connection closes.)
$heap->{dbi_helper} = POE::Component::DBIAgent->new ( DSN => \@DSN, Queries => { "create_table" => "create table #test ( name varchar(30), + value varchar(50) )", "drop_table" => "drop table #test", }, Count => 1, Debug => 1, );
Calling 'query'
$heap->{dbi_helper}->query( "create_table" => "$session_id" => "cr +eate_table_done"); $heap->{dbi_helper}->query( drop_table => $session_id => "drop_tab +le_done");
Output
POE::Component::DBIAgent received _start. POE::Component::DBIAgent Started db helper pid 9355 wheel 2 QA:(#2) 1 pending: create_table => 2::create_table_done QA:(#_) 2 pending: drop_table => 2::drop_table_done QA:(#2) 1 pending: EOF => 2::create_table_done QA:(#2) 1 pending: drop_table => 2::drop_table_done - Create table #table done. - DBD::Sybase::st execute failed: Server message number=3701 severity=11 + state=1 line=1 server=CH_TST125_SQL text=Cannot drop the table '#tes +t', because it doesn't exist in the system catalogs.: ^CPOE::Component::DBIAgent has stopped.
No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
|
|---|