|
From: Dave C. <dj...@ob...> - 2005-03-19 00:05:48
|
Bradley Feldman wrote:
> On a hunch, I reverted back to the original FreeTDS (0.62.4) I was using
> that works with the Sybase 0.63 module. I then tried the same test within
> tsql:
>
> 1>DECLARE @ReturnValue int
> 2>SELECT @ReturnValue = 3
> 3>EXEC sp_TestSproc 12345, @ReturnValue OUTPUT
> 4>SELECT @ReturnValue
> 5>go
> (return status = 0)
>
> 55
> ---------------------------
>
> I got the correct result, @ReturnValue of 55. So there's something wrong
> with the handling of output parameters within the Sybase 0.36 module,
> because tsql through FreeTDS is seeing everything correctly.
>
> Anyone have any other ideas on where/how to retrieve the value of output
> parameters using callproc in the Sybase 0.36 module?
I just installed ASE 12.5.2 on my machine so I could do some testing.
It appears there is a problem with the Cursor.callproc() method, but
only when you use a sequence to pass parameters. Dictionary parameters
are fine.
The attached sp_test.py program shows my testing.
This program produces the following output (after applying the attached
callproc.patch to fix sequence argument passing).
{'@num': 12345, '@result': 12345}
[54321, 54321]
If I remove the comment character from the code that enables the
debugging I get the output contained in the attached sp_test.log.
So if it is not working with FreeTDS then they are doing something
slightly differently that is either confusing my code or is incorrect.
- Dave
P.S. All username and password details have been removed.
--
http://www.object-craft.com.au
|