How do I translate binary date from an as400?
Posted on 2006-05-01
I am programming in VB.net. I make a connection to an as400 db. My select statement should return all rows of a particular table. in the table are two binary fields and a number of other text fields. However, my dataset does not return the binary fields. I test the data by opening excel and importing the table. I have the ODBC connection under Translation - enable "Convert binary data (CCSID 65535) to text". Otherwise the two binary fields do not show good data. If I need to include further code I will do so. I have queried other data from as400 dbs, but not encountered binary data yet. I have thought about linking the table from my sql server. Not sure if that will fix my binary conversion problem or not, however I haven't done much of that yet and have not found enough help to get that to work. Any ideas Experts? I am giving this question 1000 pts because it is urgent and I am not sure of the difficulty of the question.
My connection string:
mConnOLE.ConnectionString = "PROVIDER=IBMDA400;DATA SOURCE=mhas400;USER ID=u198711;PASSWORD=Malibu91;DEFAULT COLLECTION=BAXPRDDTA;"
My Select startment:
select * from BAXPRDDTA.F30008
sample data: (Colums IWMCU and IWLEDG are in binary format)
IWMCU IWLEDG IWSTLF IWXSDL
140 A1 2225 2225
140 A2 2414 2414
140 A3 2448 2448