A.M wrote:
> for row in out_cur:
> 
>      print row
> 
[...]

> 
> The other problem is accessing data in each row by column name. 

One useful technique is
for col1, col2, col3 in out_cur:
     sum = sum + col3

Access is still by index, but your code uses ordinary Python variables.
It works better with SELECTs as you can choose the output columns in the 
SQL. With stored procedures, there's always the possibility of someone 
changing the structure of the result set.

There exists a general library for your solution: 
http://opensource.theopalgroup.com/

Daniel


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to