If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Reading GRAPHIC datatype with db2 connect

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-04, 10:57
peterbaun peterbaun is offline
Registered User
 
Join Date: Jul 2003
Posts: 5
Reading GRAPHIC datatype with db2 connect

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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On