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.

Jason L. Froebe

Team Sybase member

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


In reply to POE::Component::DBIAgent & persistant connections? by jfroebe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.