artiya4u / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
1 stars 0 forks source link

varchar can't execute #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using altibase and python3,but can not work when the row is varchar;

ex:
iSQL> desc area_info;
[ ATTRIBUTE ]                                                         
------------------------------------------------------------------------------
NAME                                     TYPE                        IS NULL 
------------------------------------------------------------------------------
AREA_ID                                  INTEGER         FIXED       NOT NULL
CITY_CODE                                VARCHAR(10)     FIXED       NOT NULL
AREA_CODE                                VARCHAR(10)     FIXED       NOT NULL
AREA_NAME                                VARCHAR(50)     FIXED       NOT NULL
PARENT_PROV                              VARCHAR(10)     FIXED       NOT NULL
PARENT_NATION                            VARCHAR(10)     FIXED       NOT NULL

In [48]: s.execute("select * From area_info where area_code = ?",'0998')
---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)
D:\Program Files\Console2\<ipython-input-48-142f0158a9a9> in <module>()
----> 1 s.execute("select * From area_info where area_code = ?",'0998')

Error: ('07006', '[07006] Restricted data type attribute violation (331803) 
(SQLBindParameter)')

Original issue reported on code.google.com by dunshir...@gmail.com on 12 Mar 2012 at 5:47

GoogleCodeExporter commented 9 years ago
I don't have an Altibase database.  Can you generate an ODBC trace?

Original comment by mkleehammer on 24 Jun 2012 at 2:16

GoogleCodeExporter commented 9 years ago
Closing due to no response.

Original comment by mkleehammer on 29 Sep 2012 at 4:59