waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Fetching multiple resultset doesn't update cursor.description #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call a stored procedure which results multiple results set.  
2. Check cursor.description field, which returns the columns for the first 
result set. That's ok.
3. Fetch the results.
4. Call cursor.nextset()
5. cursor.description still contains the columns of the first result and not 
the second.

What is the expected output? What do you see instead?
I would like to have cursor.description reflecting the current result set, not 
the first one. Ideally, cursor.nextset() would force the updating of 
cursor.description when it's read.

What version of the product are you using? On what operating system?
IBM DB 9.5.2 with ibm_db == 0.8.0 (checked the source of trunk, it should have 
the same problem but I haven't tested it yet) on Linux RHEL.

Please provide any additional information below.
If I set cursor._Cursor__description = None after calling cursor.nextset() then 
it fixes my problem. However, I'm not entirely sure the side-effects I cause 
with this modification.

Original issue reported on code.google.com by cserna.z...@gmail.com on 23 Aug 2010 at 3:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Cserna,
 Thanks for pointing out this bug. Please find the attached patch file and apply this patch to your current working copy of ibm_db-0.8.0 (on ..path/to/site-packages/ibm_db-0.8.0-pyxxxxxx.egg/ibm_db_dbi.py)
Please try this patch and let me know how it goes.

Original comment by rahul.pr...@in.ibm.com on 26 Aug 2010 at 8:52

Attachments:

GoogleCodeExporter commented 9 years ago
I confirm that the patch is working fine for me.

Original comment by cserna.z...@gmail.com on 1 Sep 2010 at 2:07

GoogleCodeExporter commented 9 years ago
Fixed in ibm_db-1.0.4.

Original comment by rahul.pr...@in.ibm.com on 18 May 2011 at 5:10