Can't get LCHARVAR's with InformixDB
I'm using the InformixDB package, which has been a real lifesaver, but
I'm finding I can't get any data from the Informix LCHARVAR types.
They're coming in as empty strings.
The cursor._description for the field in question is:
('msg_text', 'lvarchar', 0, 0, None, None, 1)
Appreciate any help... thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Can't get LCHARVAR's with InformixDB
Carsten Haese wrote: > What version are you using? I thought I fixed lvarchars a long time ago. 2.2, with Python 2.4 on Windows... I installed via InformixDB-2.2.win32-py2.4.exe I can see the data with other tools... it's multi-line, stuff like stack traces, etc., and many start with newlines... but whatever it is, I'm consistently getting empty strings. -- http://mail.python.org/mailman/listinfo/python-list
Re: Can't get LCHARVAR's with InformixDB
Carsten Haese wrote:
> Could you possibly send me a minimal test script that shows the problem?
> Also, in case it matters, I'd like to know which versions of IDS and
> CSDK or Informix Connect you're using.
Here's a sample script:
sql = '''select msg_tx from dev_log'''
import informixdb
conn = informixdb.connect('mydb')
cursor = conn.cursor()
cursor.execute(sql)
print 'description is <%s>' % cursor.description
print cursor.fetchall()
Output is:
description is <('msg_tx', 'lvarchar', 0, 0, None, None, 1)>
[('',), ('',), ('',), ('',), ('',), ('',)]
But one of them should be:
'''Something:SomethingElse - going for 221 possibilities [User:
HOST-NAME\XYZZY]:
Id OtherData
5878C
5968X
6732V
[many more lines like this]
'''
Some hunting around, and I found this:
C:\Program Files\Informix\Client-SDK\bin>esql
IBM Informix CSDK Version 2.80, IBM Informix-ESQL Version 9.52.TC1
Not sure what IDS is... the Informix Server version is: 9.3 FC3,
according to the DBA guy.
Thanks much.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Can't get LCHARVAR's with InformixDB
Another thing...
> Output is:
> description is <('msg_tx', 'lvarchar', 0, 0, None, None, 1)>
The 0's worried me, as I could see where they could be used as parms to
allocate/trim things as necessary... just a thought.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Can't get LCHARVAR's with InformixDB
Carsten Haese wrote: > Once again, I'll need > the create table statement for the table you're selecting from in order > to investigate what's happening. Here it is: CREATE TABLE DEV_LOG( LOG_ID SERIAL, LEVEL VARCHAR (10), POI_NM VARCHAR (255), MSG_TX LVARCHAR(2000), MSG2_TX LVARCHAR(5000) ) LOCK MODE ROW; Thanks. -- http://mail.python.org/mailman/listinfo/python-list
Re: Can't get LCHARVAR's with InformixDB
Carsten Haese wrote: > I'd suggest upgrading to the newest version of CSDK. Please let me know > what happens after the upgrade. That did the trick thanks very much. -- http://mail.python.org/mailman/listinfo/python-list
