Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data Format returned from a query

Posted on 2006-06-14
3
Medium Priority
?
384 Views
Last Modified: 2008-02-26
I am using a client access odbc driver to access a db2 database (Driver={Client Access ODBC Driver (32-bit)}).  My result set returns ???????????????@ for one field in the query.  I can run the same query in sql workbench using a  (com.ibm.as400.access.AS400JDBCDriver) driver and it works just fine.  The only way to return the field that I need is to cast the field as numeric, but some of the records contain alphanumeric data.  

Other fields in the same table return with the same data type return the correct format.

Thanks in advance

0
Comment
Question by:gdlp2004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 16908057
what is the underlying column data type?

can you post the definition of the table...?

which OS and version of UDB are you using?
0
 
LVL 27

Accepted Solution

by:
tliotta earned 2000 total points
ID: 16908096
gdlp2004:

> but some of the records contain alphanumeric data

Whoever is in charge of that file (table) needs to fix it. Either the field (column) is defined incorrectly or there is invalid data in it. If there is invalid data, e.g., alphanumerics in a numeric column, there is some process that is allowing bad data to get inserted/updated. Unpredictable results will happen eventually.

The IBM driver is indicating that data is not following the rules of the file definition. You can use another driver that doesn't care, but you can't predict what results might come tomorrow or next week or whenever the worst possible time might arrive.

Tom
0
 
LVL 7

Expert Comment

by:sachinwadhwa
ID: 16909447
cast it to CHAR or VARCHAR

I think it could be a codepage issue or is your field "for bit data" ?
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question