All,
Having difficulty with an error message "no statement executing" against the following my $dbh = DBI->connect($DATA_SOURCE,$USER,$PASSWORD,{AutoCommit => 0, RaiseError => 0, PrintError => 0 }) or error("Can`t connect to db: DBI::errstr", 1,2); # DBI->trace(2); my $sth = $dbh->prepare(qq[declare \@p int exec spfoo \@p output]); $sth->execute(); # Fails here do { while(my $data = $sth->fetch) { if($sth->{syb_result_type} == 4042) { # This is the OUTPUT param print "Another Result".$data->[0]."\n"; } } } while($sth->{syb_more_results}); print "\nResult: ".CS_STATUS_RESULT; print "\n"; $sth->finish; $dbh->disconnect; Output is no statement executing at ./dump.pl line 28. Result: 4043 Stored Proc is CREATE PROCEDURE foo @p3 varchar(100) OUTPUT as SET @p3 = 5 GO I have tried against most examples I can find and have no difficulty binding columns etc. MSSQL v 7.0 Linux FreeTDS sybase-11.9.2 perl v5.6.1 _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx