We help IT Professionals succeed at work.
Get Started

Type mismatch on vartype 8209 when reading DB2 recordset in Active Server Pages

KevinGaynor
KevinGaynor asked
on
1,753 Views
Last Modified: 2012-08-14
I am trying to read some data from a logical file on our AS/400 (DB2) from an ASP script.

This file (and it seems all the other files in the same library) will open - I can navigate through the file using a recordset, but whenever I attempt to use a response.write on a field, I get a "Type Mismatch" error.

I tried the same thing in Visual Basic - instead of Type Mismatch the value of the field was returned as "??????????".

When I display the VarType of the field - it is returned as "8209" - which I have discovered is some sort of 'byte array' data type.

I have tried several byte array conversion routines from various 'googled' sources but none of them work - they don't bug out but the results do not match the source data.

What is puzzling me is I can open and get values from any other file in any other library - it seems restricted to files in this one library.

The data types are character data types in the source file.

Any suggestions to how I can tackle this?

I have tried both the Client Access ODBC and IBMDA400 connection strings - both do the same thing.
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE