cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

hdbcli>2.5 cannot bind parameters by name (Python)

michael_hadorn7
Discoverer
0 Likes
847

Hi there

Since the hdbcli>=2.5 it's not possible to bind parameters by name.

In version hdbcli==2.4.202 it's still working.

With unnamed params it's working (using of ?).

I'm using conda with python 3.8 on windows.

I tested the behaviour with:

  • 2.5.111
  • 2.6.64


Minimal example:

from hdbcli import dbapi

conn = dbapi.connect(...)
cursor = conn.cursor()

sql = 'SELECT count(*) FROM sys.tables where table_name like :xx'
params = {
    'xx': '%'
}

cursor.execute(sql, params)
for row in cursor:
    print(row)

Error message:

SystemError: d:\bld\python-split_1602094606092\work\objects\dictobject.c:2469: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "S:/cdwh-prefect/test.py", line 12, in <module>
    cursor.execute(sql, params)
SystemError: <built-in method parsenamedquery of pyhdbcli.Cursor object at 0x0000026BB89892F0> returned a result with an error set<br>
View Entire Topic
michael_hadorn7
Discoverer
0 Likes

Hi

Thanks for your answer.

Where was this information posted already? (I searched a lot for this error)

Do i looked on the wrong place?

Regards

Michael