At 12:43 PM 9/3/2003, NIPP, SCOTT V (SBCSI) wrote:
        I keep coming up with this error, but I AM performing an execute
prior to the fetch.  I have seen some other threads on this, and have
upgraded the DBD:Mysql to the latest version on CPAN.  Any ideas?  Here is a
small portion of the code:

if ($rows2 == 1) {
    my $vals = $test2->fetchrow_hashref ('NAME_lc');
    my $id = $vals->{id};
    my $query = $dbh2->prepare("SELECT * FROM fsdata WHERE id ='$id'");
    $query->execute();
    $query->finish();
    while (my $ref2 = $query->fetchrow_hashref ('NAME_lc')) {
      undef $set2;

        I am getting an error on the fetchrow_hashref line.  Thanks in
advance.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com

Don't call finish() until you are done with your execute() - place it AFTER your while statement. finish() doesn't kill the statement handle, but it does kill the current execute() - it frees up the buffer space where your data resides and you haven't yet retrieved it from that buffer.





Reply via email to