From: Dave C. <dj...@ob...> - 2005-03-19 00:41:19
|
Dave Cole <dj...@ob...>Dave Cole <dj...@ob...>Dave Cole wrote: > 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. I just installed FreeTDS 0.61 (Debian sarge) and the test program fails to run. The ct_param() functions fail. What I did discover was that you can fudge it like this: print db.execute(''' declare @result int exec sp_test_output 12345, @result output select @result ''') It prints the following: [[], [(12345,)]] I am now downloading the current cvs snapshot for FreeTDS to see if they have fixed parameter passing. - Dave -- http://www.object-craft.com.au |