You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @anthony-tuininga! I have similar problem #12 when i try insert large values use bind variables. Let' see code below.
System info
platform.platform: Windows-8.1-6.3.9600-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.10.3
oracledb.version: 1.2.1
Oracle Database: 19c Enterprise Edition Release 19.0.0.0.0 - Production
create test table:
createtablex_test(name varchar2(10000char), date d1);
Python code:
importoracledbimportdatetimedsn=f"*************************"connection=oracledb.connect(dsn)
cursor=connection.cursor()
test_value="x"*9000# if not this then raise ORA-01483: invalid length for DATE or NUMBER bind variablecursor.setinputsizes(name=oracledb.DB_TYPE_CLOB)
# when operator in not 'begin end' block, code will be running without errors.cursor.execute(""" begin insert into x_test(name, d1) values(:name, :d); end; """, name=test_value,
d=datetime.datetime.now())
# this execute will be running without error # cursor.setinputsizes(name=oracledb.DB_TYPE_CLOB)cursor.execute(""" begin insert into x_test(name, d1) values(:name, sysdate); end; """, name=test_value))
connection.commit()
connection.close()
Traceback:
Traceback (most recent call last):
File "C:\test\bug.py", line 11, in <module>
cursor.execute("""
File "C:\test\venv\lib\site-packages\oracledb\cursor.py", line 378, in execute
impl.execute(self)
File "src\oracledb\impl/thin/cursor.pyx", line 133, in oracledb.thin_impl.ThinCursorImpl.execute
File "src\oracledb\impl/thin/protocol.pyx", line 383, in oracledb.thin_impl.Protocol._process_single_message
File "src\oracledb\impl/thin/protocol.pyx", line 384, in oracledb.thin_impl.Protocol._process_single_message
File "src\oracledb\impl/thin/protocol.pyx", line 377, in oracledb.thin_impl.Protocol._process_message
oracledb.exceptions.DatabaseError: ORA-01483: неверная длина для переменных привязки типов DATE или NUMBER
Process finished with exit code 1
P.S. With cx_Oracle all succeed
The text was updated successfully, but these errors were encountered:
I have pushed a patch that should correct this issue and added a relevant test case. If you are able to build from source you can verify that it corrects your issue as well.
Hi @anthony-tuininga! I have similar problem #12 when i try insert large values use bind variables. Let' see code below.
System info
platform.platform: Windows-8.1-6.3.9600-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.10.3
oracledb.version: 1.2.1
Oracle Database: 19c Enterprise Edition Release 19.0.0.0.0 - Production
create test table:
Python code:
Traceback:
P.S. With cx_Oracle all succeed
The text was updated successfully, but these errors were encountered: