Re: EasyDBI -- No result, just 'Died' [Was: POE & DBI]
Sure, I don't mind, but how would you suggest doing so? Like I mentioned in the OP, the queries run without problems through straight DBI (using the same DBD::ODBC driver). -jp On 2/22/07, David Davis <[EMAIL PROTECTED]> wrote: Since I don't have a test case, You'll have to dig deeper yourself. David On 2/22/07, Jake Peavy < [EMAIL PROTECTED]> wrote: > > Forgot the list... sorry. > > -jp > > -- Forwarded message -- > From: Jake Peavy <[EMAIL PROTECTED]> > Date: Feb 21, 2007 6:09 PM > Subject: Re: EasyDBI -- No result, just 'Died' [Was: POE & DBI] > To: David Davis < [EMAIL PROTECTED]> > > I'm not totally sure what you mean by "error message"... > > With > sub POE::Component::EasyDBI::DEBUG () { 1 } > > I get the following: > > $_[ARG0]->{'error'} => 'Died' > > and > > POE::Component::EasyDBI got an read error 0 from Subprocess: '' > shutdown: > 1 > > Does that help? > > -jp > > > > On 2/21/07, David Davis < [EMAIL PROTECTED]> wrote: > > > > Do you have the exact error message handy? None of my code has the > word > > died, so I'm assuming its an error coming from dbi or dbd::odbc > > > > David > > > > On 2/21/07, Jake Peavy <[EMAIL PROTECTED]> wrote: > > > > > > On 2/21/07, David Davis <[EMAIL PROTECTED] > wrote: > > > > > > > > I'm the author of EasyDBI > > > > > > > > > > > > > > > Comments? Suggestions? > > > > > > > > David > > > > > > > > On 2/21/07, Matt Sickler <[EMAIL PROTECTED]> wrote: > > > > > > > > > > yes, DBI and PoCoEasyDBI work just fine on windows > > > > > > > > > > On 2/21/07, Bill Nash <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > Well... > > > > > > > > > > > > A better question would be: Do Perl and DBI work with windows? > > > > > > > > > > > > - billn > > > > > > > > > > > > On Wed, 21 Feb 2007, Mathieu Longtin wrote: > > > > > > > > > > > > > Do any of them work with windows? > > > > > > > > > > > > > > On 2/21/07, Matt Sickler < [EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > POE::Component::EasyDBI is what I use - quite simple and > can > > > be > > > > > > powerful > > > > > > > > > > > > > > > > On 2/20/07, Kevin Scaldeferri < [EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > > > Anyone want to strongly advocate for one of the four or > so > > > > > > components > > > > > > > > > that comes up on a CPAN search for "POE DBI"? > > > > > > > > > > Ah, the perfect thread for me to jump in with an issue I had with > > > EasyDBI on > > > Win32, original message below to which I received no responses. Any > > > advice > > > would be much appreciated. > > > > > > -- Forwarded message -- > > > From: Jake Peavy <[EMAIL PROTECTED]> > > > Date: Dec 6, 2006 7:09 PM > > > Subject: EasyDBI -- No result, just 'Died' > > > To: POE Mailing List < poe@perl.org> > > > > > > Hey yall, > > > > > > I'm having some problems with EasyDBI. I'm trying to do two > > > simultaneous > > > selects from two different databases. Both queries work fine via > > > standard > > > DBI, but when I run through EasyDBI and POE, the queries take the > right > > > amount of time (the query time is roughly 2 minutes), but they don't > > > > return > > > results - all I get is the Error value of the hash in ARG0 reporting > the > > > query "Died". > > > > > > The queries make use of DBD::ODBC if that matters. My guess is > maybe > > > that > > > EasyDBI sees something in the return value that it interprets as the > > > query > > > dying (maybe it's trying to compare the number of rows it got to the > > > number > > > the DB reported it was sending? just a WAG..), however, like I >
Re: EasyDBI -- No result, just 'Died' [Was: POE & DBI]
Since I don't have a test case, You'll have to dig deeper yourself. David On 2/22/07, Jake Peavy <[EMAIL PROTECTED]> wrote: Forgot the list... sorry. -jp -- Forwarded message -- From: Jake Peavy <[EMAIL PROTECTED]> Date: Feb 21, 2007 6:09 PM Subject: Re: EasyDBI -- No result, just 'Died' [Was: POE & DBI] To: David Davis <[EMAIL PROTECTED]> I'm not totally sure what you mean by "error message"... With sub POE::Component::EasyDBI::DEBUG () { 1 } I get the following: $_[ARG0]->{'error'} => 'Died' and POE::Component::EasyDBI got an read error 0 from Subprocess: '' shutdown: 1 Does that help? -jp On 2/21/07, David Davis < [EMAIL PROTECTED]> wrote: > > Do you have the exact error message handy? None of my code has the word > died, so I'm assuming its an error coming from dbi or dbd::odbc > > David > > On 2/21/07, Jake Peavy <[EMAIL PROTECTED]> wrote: > > > > On 2/21/07, David Davis <[EMAIL PROTECTED]> wrote: > > > > > > I'm the author of EasyDBI > > > > > > > > > > Comments? Suggestions? > > > > > > David > > > > > > On 2/21/07, Matt Sickler <[EMAIL PROTECTED]> wrote: > > > > > > > > yes, DBI and PoCoEasyDBI work just fine on windows > > > > > > > > On 2/21/07, Bill Nash <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > Well... > > > > > > > > > > A better question would be: Do Perl and DBI work with windows? > > > > > > > > > > - billn > > > > > > > > > > On Wed, 21 Feb 2007, Mathieu Longtin wrote: > > > > > > > > > > > Do any of them work with windows? > > > > > > > > > > > > On 2/21/07, Matt Sickler <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > POE::Component::EasyDBI is what I use - quite simple and can > > be > > > > > powerful > > > > > > > > > > > > > > On 2/20/07, Kevin Scaldeferri < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > Anyone want to strongly advocate for one of the four or so > > > > > components > > > > > > > > that comes up on a CPAN search for "POE DBI"? > > > > > > > Ah, the perfect thread for me to jump in with an issue I had with > > EasyDBI on > > Win32, original message below to which I received no responses. Any > > advice > > would be much appreciated. > > > > -- Forwarded message -- > > From: Jake Peavy <[EMAIL PROTECTED]> > > Date: Dec 6, 2006 7:09 PM > > Subject: EasyDBI -- No result, just 'Died' > > To: POE Mailing List < poe@perl.org> > > > > Hey yall, > > > > I'm having some problems with EasyDBI. I'm trying to do two > > simultaneous > > selects from two different databases. Both queries work fine via > > standard > > DBI, but when I run through EasyDBI and POE, the queries take the right > > amount of time (the query time is roughly 2 minutes), but they don't > > return > > results - all I get is the Error value of the hash in ARG0 reporting the > > query "Died". > > > > The queries make use of DBD::ODBC if that matters. My guess is maybe > > that > > EasyDBI sees something in the return value that it interprets as the > > query > > dying (maybe it's trying to compare the number of rows it got to the > > number > > the DB reported it was sending? just a WAG..), however, like I said, > > the > > queries are ok using a normal DBI connection. > > > > Here's the code I'm using though it won't be much help without the back > > end > > DB. If anyone has any ideas on how to debug, I'm all ears. In the > > meantime, I also tried SimpleDBI, stay tuned for those results... :)~ > > > > TIA, > > -jp > > > > #!/usr/bin/perl > > > > use strict; > > use warnings; > > > > use POE; > > use POE::Component::EasyDBI; > > > > use Data::Dumper; > > $Data::Dumper::Maxdepth = 1; > > > > POE::Component::EasyDBI->spawn( > > alias => 'db1', > > dsn => 'dbi:ODBC:Sybase.db1', > > username=> 'user', > > p
Re: EasyDBI -- No result, just 'Died' [Was: POE & DBI]
Do you have the exact error message handy? None of my code has the word died, so I'm assuming its an error coming from dbi or dbd::odbc David On 2/21/07, Jake Peavy <[EMAIL PROTECTED]> wrote: On 2/21/07, David Davis <[EMAIL PROTECTED]> wrote: > > I'm the author of EasyDBI Comments? Suggestions? > > David > > On 2/21/07, Matt Sickler <[EMAIL PROTECTED]> wrote: > > > > yes, DBI and PoCoEasyDBI work just fine on windows > > > > On 2/21/07, Bill Nash <[EMAIL PROTECTED]> wrote: > > > > > > > > > Well... > > > > > > A better question would be: Do Perl and DBI work with windows? > > > > > > - billn > > > > > > On Wed, 21 Feb 2007, Mathieu Longtin wrote: > > > > > > > Do any of them work with windows? > > > > > > > > On 2/21/07, Matt Sickler <[EMAIL PROTECTED]> wrote: > > > > > > > > > > POE::Component::EasyDBI is what I use - quite simple and can be > > > powerful > > > > > > > > > > On 2/20/07, Kevin Scaldeferri <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Anyone want to strongly advocate for one of the four or so > > > components > > > > > > that comes up on a CPAN search for "POE DBI"? > Ah, the perfect thread for me to jump in with an issue I had with EasyDBI on Win32, original message below to which I received no responses. Any advice would be much appreciated. -- Forwarded message -- From: Jake Peavy <[EMAIL PROTECTED]> Date: Dec 6, 2006 7:09 PM Subject: EasyDBI -- No result, just 'Died' To: POE Mailing List Hey yall, I'm having some problems with EasyDBI. I'm trying to do two simultaneous selects from two different databases. Both queries work fine via standard DBI, but when I run through EasyDBI and POE, the queries take the right amount of time (the query time is roughly 2 minutes), but they don't return results - all I get is the Error value of the hash in ARG0 reporting the query "Died". The queries make use of DBD::ODBC if that matters. My guess is maybe that EasyDBI sees something in the return value that it interprets as the query dying (maybe it's trying to compare the number of rows it got to the number the DB reported it was sending? just a WAG..), however, like I said, the queries are ok using a normal DBI connection. Here's the code I'm using though it won't be much help without the back end DB. If anyone has any ideas on how to debug, I'm all ears. In the meantime, I also tried SimpleDBI, stay tuned for those results... :)~ TIA, -jp #!/usr/bin/perl use strict; use warnings; use POE; use POE::Component::EasyDBI; use Data::Dumper; $Data::Dumper::Maxdepth = 1; POE::Component::EasyDBI->spawn( alias => 'db1', dsn => 'dbi:ODBC:Sybase.db1', username=> 'user', password=> 'pass', stopwatch => 1, ); POE::Component::EasyDBI->spawn( alias => 'db2', dsn => 'dbi:ODBC:Sybase.db2', username=> 'user', password=> 'pass', stopwatch => 1, ); POE::Session->create( inline_states => { _start => sub { print '[' . localtime() . "] initiating db1 query\n"; $_[KERNEL]->post( 'db1', arrayhash => { sql => 'select * from table where foo = ?', event=> 'db1_result_handler', placeholders => [ 'bar' ], } ); print '[' . localtime() . "] initiating db2 query\n"; $_[KERNEL]->post( 'db2', arrayhash => { sql => 'select * from table where foo = ?', event=> 'db2_result_handler', placeholders => [ 'bar' ], } ); }, db1_result_handler => sub { #my %success_hash = %{ $_[ARG0] }; print '[' . localtime() . "] db1 query complete\n"; print Dumper $_[ARG0]; $_[KERNEL]->post( db1 => 'shutdown' ); }, db2_result_handler => sub { #my %success_hash = %{ $_[ARG0] }; print '[' . localtime() . "] db2 query complete\n"; print Dumper $_[ARG0]; $_[KERNEL]->post( db2 => 'shutdown' ); }, }, ); $poe_kernel->run(); __END__ -- -jp Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid of the dark, but the dark is afraid of Chuck Norris