Cannot pass python None-Type to procedure with custom DbObjectType #127
-
First things first
Problem descriptionI'd like to store a python list consisting of strings into a column. If the list is empty, A simple table: Stored Procedure: Python code: SQL output: However, when I set QuestionWhat is the correct way to insert NULL into said column, but also passing it as an argument to the procedure? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
You're missing one line of code: cur.setinputsizes(typeObj)This needs to be added just before the call to |
Beta Was this translation helpful? Give feedback.
You're missing one line of code:
This needs to be added just before the call to
cur.execute(). The reason is because the valueNonedoesn't contain any type information, so python-oracledb simply treats it as VARCHAR2 -- which is the wrong type. You must tell python-oracledb what type you intend to pass -- then the valueNoneis acceptable. Hope that makes sense!