Closed ibnadam closed 1 year ago
I see it also with PostgreSQL. I am adding char columns to the test suite and will provide a patch shortly. Thanks for reporting this!
Same applies to -8
:
Traceback (most recent call last):
File "/home/mono/.projects/eup/md-sync-java/test.py", line 58, in <module>
cursor.execute("select * from KDIDATV8.PBFSTSS limit 5000")
File "src/ceODBC/cursor.pyx", line 423, in ceODBC.driver.Cursor.execute
File "src/ceODBC/cursor.pyx", line 269, in ceODBC.driver.Cursor._execute
File "src/ceODBC/cursor.pyx", line 383, in ceODBC.driver.Cursor._prepare_result_set
File "src/ceODBC/cursor.pyx", line 205, in ceODBC.driver.Cursor._create_var_for_result_set
File "src/ceODBC/types.pyx", line 79, in ceODBC.driver.DbType._from_sql_data_type
File "src/ceODBC/errors.pyx", line 83, in ceODBC.driver._raise_from_string
ceODBC.exceptions.NotSupportedError: SQL data type -8 not supported
-8 is a GRAPHICS field (String) on IBM i DB2 (https://www.ibm.com/docs/en/i/7.4?topic=types-dbcs-graphic-fields#graphic) storing data in double byte.
Looks like SQL data type -8 refers to SQL_WCHAR -- which I added support for in 3.1 (just released). Does that resolve the issue for you?
Yes, works @anthony-tuininga, thank you!
When executing a select query e.g.
where some_col is defined as:
I get the following error:
Running from Ubuntu 20.04, driver "ODBC Driver 17 for SQL Server"
Thanks.