Hi,
SW environment :
DB2/AS400 version 5.2
DB2 Connect version 7.2
I am trying to read data from a table (file) where the field is defined with the graphic datatype. The table is defined like this
create table pbtest(f1 GRAPHIC(5) CCSID 13488 DEFAULT NULL ) ;
When trying to read data (select f1 from pbtest

from this table I get this error :
SQL0804N The application program input parameters for the current request are not valid. Reason code "102".
If a host variable or SQLVAR in the SQLDA is invalid then:
host variable/SQLVAR number = "1",
SQLTYPE = "469",
SQLLEN = "5",
host variable/SQLVAR type = "OUTPUT".
SQLSTATE=07002
I can however insert data into this table with no problems
insert into pbtest values ('test');
Any suggestions to how I will be able to read this kind of data ?
I can read the data by casting the graphic to a char - but this is not a valid solution (select cast(f1 as char(5)) from pbtest). I need to be able to read the data without any explicit conversions - otherwise a significant amount of program changes have to be applied.
Thanks
Regards
Peter