'in db2, Why does python script returning 'none' always, when we assign '0'
python script:
import ibm_db
v_conn = ibm_db.connect("DATABASE=BLUDB;HOSTNAME=127.0.1.1;PORT=50000;PROTOCOL=TCPIP;
Solution 1:[1]
This behaviour is reproducible with both python 2.7 and python 3.6.9 and ibm_db version 3.0.1 on linux.
As a workaround, in your stored procedures, declare the output parameters with type BIGINT. Then the ibm_db module will not treat the 0 as none as it does for both SMALLINT and INTEGER .
You can open a ticket on github to get more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mao |
