APAR#:SE35276
Component:5722XE100 - IBM ISERIES CLIENT ACCESS EXP
Release(s)R530, R540
Abstract
CA400EXP-IDB2DATA INDEXOUTOFRANGEEXCEPTION READING NULL CHAR


Error Description
An application using the iSeries Access for Windows .NET        
provider to access data on the iSeries encounters an exception  
when getting data. The application is using the                
DataAdapter.Fill method to get data from the iSeries but the    
data has an embedded null. This results in an exception in the  
application, 'System.IndexOutOfRangeException'. If the same is  
done using the iSeries Access OLEDB IBMDASQL provider no        
exception is encountered.                                      

Local Fix (internal use)
NONE                                                            

Problem Summary
An application using the iSeries Access for Windows .NET        
provider to access data on the iSeries encounters an exception  
when getting data. The application is using the                
DataAdapter.Fill method to get data from the iSeries but the    
data has an embedded null. This results in an exception in the  
application, 'System.IndexOutOfRangeException'. If the same is  
done using the iSeries Access OLEDB IBMDASQL provider no        
exception is encountered.                                      

Problem Conclusion
The problem happens because the null character causes a        
translation error. This is the expected behavior. Because some  
customers would like to avoid this problem and instead receive  
a substitution character instead of the exception, a new        
property is added to the .NET provider that can be used to get  
the desired behavior.  This new property should be set in the  
ConnectionString of the iDB2Connection object.                  
                                                               
Property:  bool AllowUnsupportedChar                            
                                                               
Description:  Gets a value which indicates whether unsupported  
characters will be allowed during translation, or whether their
                                                               
presence will cause an exception to be thrown during            
translation                                                    
of data coming from the host.                                  
                                                               
Default value:  false (cause an exception)                      
                                                               
Example of how to get the new behavior:                        
                                                               
iDB2Connection cn = new iDB2Connection("DataSource=mysystem;    
AllowUnsupportedChar=true;");                                   Temporary Fix


Comments
The problem happens because the null character causes a        
translation error. This is the expected behavior. Because some  
customers would like to avoid this problem and instead receive  
a substitution character instead of the exception, a new        
property is added to the .NET provider that can be used to get  
the desired behavior.  This new property should be set in the  
ConnectionString of the iDB2Connection object.                  
                                                               
Property:  bool AllowUnsupportedChar                            
                                                               
Description:  Gets a value which indicates whether unsupported  
characters will be allowed during translation, or whether their
                                                               
presence will cause an exception to be thrown during            
translation                                                    
of data coming from the host.                                  
                                                               
Default value:  false (cause an exception)                      
                                                               
Example of how to get the new behavior:                        
                                                               
iDB2Connection cn = new iDB2Connection("DataSource=mysystem;    
AllowUnsupportedChar=true;");                                  

Circumvention


PTFs Available
R540 SI37892PTF Cover Letter   1000

Affected Modules
         
         

Affected Publications



Summary Information
Status.................................................. CLOSED PER
Severity................................................ 3
HIPER.................................................. No
PIN........................................................ Yes
Reported Component....................... 5722XE100
Fixed Component............................... 5722XE100
Failing Module................................... RCHMGR
Reported Release............................ R540
Reported Release PTF..................... SI32972
Latest Release PTF......................... 
FESN.................................................... 0913813
Duplicate Of........................................
Security Integrity.................................



IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information