waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

I got '<nil>' instead of a real value when I select a graphic column. #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. DB2 CREATE TABLE TEST ( COL1 GRAPHIC(10) )
2. DB2 INSERT INTO TEST VALUES ( 'AAAA')
3.
import ibm_db
conn=ibm_db.connect
("DATABASE=dbname;HOSTNAME=hostname;PORT=50000;PROTOCOL=TCPIP;UID=userid;PW
D=password;", "", "")
sql = "SELECT COL1 FROM TEST"
stmt = ibm_db.exec_immediate(conn,sql)
dictionary = ibm_db.fetch_tuple(stmt)
while dictionary != False:
    print dictionary
    dictionary = ibm_db.fetch_tuple(stmt)

What is the expected output? What do you see instead?
expected : ('AAAA',)
showed : (<nil>,)

What version of the product are you using? On what operating system?
DB2 LUW V9.5.1 on Windows 2003 EE

Please provide any additional information below.
How can I see the value in the graphic column?

Original issue reported on code.google.com by SangmanL...@gmail.com on 5 Feb 2009 at 2:44

GoogleCodeExporter commented 9 years ago
I am able to replicate the problem. Will post a solution when I solve it.

-
Abhigyan

Original comment by abhigyan...@in.ibm.com on 5 Feb 2009 at 7:01

GoogleCodeExporter commented 9 years ago
I have fixed the problem. Here is the new ibm_db.c file which is returning 
Graphics 
values. The changes will be included in next driver release.
Let me know how this goes.

Regards,
Abhigyan

Original comment by abhigyan...@in.ibm.com on 18 Feb 2009 at 12:58

Attachments: