Hi, assume, we have the two tables T1 and T2: CREATE TABLE T1 ( K1 VARCHAR(3), PRIMARY KEY (K1) ) CREATE TABLE T2 ( K1 VARCHAR(3), K2 VARCHAR(3), PRIMARY KEY ( K1, K2 ) )
with the following contents: T1: K1 T2: K1 | K2 ----- ----------------- 001 002 | 001 002 and the following script: #!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect("dbi:MaxDB:....",...); my $sth1 = $dbh->prepare("Select k1 From t1"); my $sth2 = $dbh->prepare("Select k2 From t2 Where k1 = ?"); $sth1->execute; while ( my ( $k1 ) = $sth1->fetchrow_array ) { print ">T1 - $k1\n"; $sth2->execute( $k1 ); while ( my ( $k2 ) = $sth2->fetchrow_array ) { print ">>>T2 - $k1 $k2\n"; } } $sth1->finish; $sth2->finish; $dbh->disconnect; The Result is: >T1 - 001 >T1 - 002 and not as expected: >T1 - 001 >T1 - 002 >>>T2 - 001 002 After the first execute of $sth2 with an empty result set, the result set of $sth2 is always empty. Used with DBD::MaxDB 7.6.00.16a with SQLDBC 7.6.00.12 on SuSE 9.3 with MaxDB 7.5.21 Any ideas? Kind regards Thomas -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]