First, big thanks to Jeff Urlwin for developing DBD::ODBC, (for me) DBI 
would be useless without it.

I'm using SQL Server and DBD::ODBC 0.41 (because that's what I can get 
by ppm) I've read the change log and am wondering if the 0.45 release is 
better (more stable) than 0.41. I could write workarounds for the 
problems I find in 0.41 but I might be better of using the beta. Where 
can I get a binary (by ppm) release of 0.45? (I've got 0.41 from 
http://www.xmlproj.com/PPM/)

I have the following problems:

______________________________
1. Return value from stored procedure truncated:

$dbh->prepare('{?=call testPrc(?)}');
....
{    $queryOutputParameters{$name} = $value || ' '; # notice: one space
   
    $sth->bind_param_inout($i, \$queryOutputParameters{$name}, 30, { 
TYPE => $type });
}
....
$sth->execute();

The procedure should return 111 but I get 1. If I add more spaces to 
$queryOutputParameters{$name} I'll get more data, ie five spaces gives 
me "111  ". It took me quite some time to figure this out. max_len (30) 
in bind_param_inout is ignored.

______________________________
2. multiple result sets, keys are not updated by fetchrow_hashref
The first time I call testPrc (code below), I get this (which is expected):
outputData $VAR1 = {
          'some_data' => '1'
        };

outputData $VAR1 = {
          'parameter1' => '11',
          'some_more_data' => '3'
        };

The second time, I get this (should get the same result as the first time):
outputData $VAR1 = {
          'parameter1' => '1',
          'some_more_data' => '3'
        };

outputData $VAR1 = {
          'parameter1' => '11',
          'some_more_data' => '3'
        };


ALTER PROCEDURE dbo.testPrc
@parameter1 int = 22
AS
    select 1 as some_data
    select isnull(@parameter1, 33) as parameter1, 3 as some_more_data
   
    RETURN(@parameter1 + 1)


Thanks,
Roger P

Reply via email to