You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Daschinsky (Jira)" <ji...@apache.org> on 2023/10/10 11:01:00 UTC

[jira] [Comment Edited] (IGNITE-12175) ODBC driver does not support WVARCHAR (typeId=-9) which breaks pyodbc

    [ https://issues.apache.org/jira/browse/IGNITE-12175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17773644#comment-17773644 ] 

Ivan Daschinsky edited comment on IGNITE-12175 at 10/10/23 11:00 AM:
---------------------------------------------------------------------

[~richardcrossley] It can be easily fixed in this way:
{code}
with pyodbc.connect('DRIVER={Apache Ignite};SERVER=127.0.0.1;PORT=10800;SCHEMA=PUBLIC') as conn:
    conn.setencoding(encoding='utf-8')
    conn.setdecoding(pyodbc.SQL_CHAR, encoding='utf-8')
    conn.setdecoding(pyodbc.SQL_WCHAR, encoding='utf-8')
{code}



was (Author: ivandasch):
[~richardcrossley] It can be easily fixed in this way:
{code}
with pyodbc.connect('DRIVER={Apache Ignite};SERVER=127.0.0.1;PORT=10800;SCHEMA=PUBLIC') as conn:$
    conn.setencoding(encoding='utf-8')$
    conn.setdecoding(pyodbc.SQL_CHAR, encoding='utf-8')$
    conn.setdecoding(pyodbc.SQL_WCHAR, encoding='utf-8')
{code}


> ODBC driver does not support WVARCHAR (typeId=-9) which breaks pyodbc
> ---------------------------------------------------------------------
>
>                 Key: IGNITE-12175
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12175
>             Project: Ignite
>          Issue Type: Improvement
>          Components: odbc
>    Affects Versions: 2.7.5
>            Reporter: Ilya Kasnacheev
>            Priority: Major
>         Attachments: Python_Traceback.txt, main.py
>
>
> Subj:
> pyodbc.Error: ('HYC00', '[HYC00] Data type is not supported. [typeId=-9] (0) (SQLBindParameter)')
> https://stackoverflow.com/questions/57971252/python-string-to-varchar-mapping-using-odbc-with-apache-ignite-not-supported/57973839#57973839



--
This message was sent by Atlassian Jira
(v8.20.10#820010)