| Issue 146: | Printing character data results from Teradata results in "\x00\x00\x00\x00" prefixed tuple/mangled data... | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Connect to Teradata (version 12 or 13) from Linux using pyodbc 2.1.8 + python 2.4.
2. Do a SHOW TABLE on an object
3. Print the rows from the fetchall()
What is the expected output?
Something like:
("CREATE SET TABLE dba_tool.test1 ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
t1 INTEGER,
HOST_IP_ADDR CHAR(16)
[truncated output...]
What do you see instead?
("\x00\x00\x00\x00TE SET TABLE dba_tool.test1 ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
t1 INTEGER,
HOST_IP_ADDR CHAR(16)
[truncated output...]
What version of the product are you using? On what operating system?
Using Pyodbc 2.1.8. Running on RHES, as below
uname -a
Linux phxaisadm002 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Please provide any additional information below.
Jan 6, 2011
#1
textur...@gmail.com
Apr 29, 2011
I am facing the same problem w/ another database. @textures2 could you outline which source files you had to modify. Running openSuse11.x uname -a Linux gelsenkirchen 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux pyodbc version = 2.1.8 >>> row (..., '\x00\x00\x00\x00lay', ...) expected would be 'display' the ODBC trace contains the following details SQLGetData 2011-04-29 08:00:33.073488 StatementHandle [in] : 0x000000000081d690 ColumnNumber [in] : 2 TargetType [in] : SQL_C_CHAR TargetValuePtr [out] : 0x00007fff948a8520 BufferLength [in] : 1024 ValuePtr [out] : SQL_UB_OFF ::GETOBJECT SQLCURS_5 RESULT[0059218C3C7F0000] COLUMN INDEX TYPE AT LENGTH INDICATOR DATA POSITION 2 ASCII T 1024 0x00007fff948a8100 0x00007fff948a8520 0x0000000000000000 DATA INDEX TYPE AT LENGTH INDICATOR DATA 2 ASCII T 1024 7 'display' StrLen_or_IndPtr [out] : 7 SQLRETURN : SQL_SUCCESS Any help is appreciated.
Mar 28, 2013
Any update on this 'matthieu...@hpi.uni-potsdam.de'?? I am getting the same problem where the first 4 characters are replaced with '\x00\x00\x00\x00' ? Linux <name> 2.6.18-348.3.1.el5 #1 SMP Tue Mar 5 13:19:32 EST 2013 x86_64 x86_64 x86_64 GNU/Linux pyodbc-2.1.5-2.el5 |