Feedback
Did this article resolve your question/issue?

   

Article

Error occurs when 2 null-able columns are concatenated with a character string executing a select statement.

Information

 
TitleError occurs when 2 null-able columns are concatenated with a character string executing a select statement.
URL Namean-unexpected-null-value-was-returned-for-column-user-generated-expression-expr1000
Article Number000178913
EnvironmentProduct: Openaccess SDK
Version: 8.0 Build 0038
OS: Windows
Database: All supported databases
Application: SQL Server linked server
Question/Problem Description
Below error occurs when 2 null-able columns are concatenated with a character string executing a select statement using Openaccess SDK via SQL Server linked server.
Steps to Reproduce-Table DDL : create table testd(col1 char(10), col2 char(10))
-Insert value : insert into testd values (NULL, NULL)
-sample Select resulting in the error : select col1, col2, col1 + ' ' + col2 as plussed from testd
Clarifying Information
Error MessageAn unexpected NULL value was returned for column "(user generated expression).expr1000"...
Defect NumberDefect 52892
Enhancement Number
Cause
Resolution
Fixed in hot fix 8.0.1.0049

Refer to "OpenAccess SDK hot fix download and install instructions" for instructions on how to download and install the hot fix.
Workaround
Notes
OpenAccess SDK 8.1 has been enhanced to control the nullabilty of the result expression when the string data is concatenated with a NULL value using the ipGetInfo() option: IP_INFO_CONCAT_NULL_YIELDS_NULL.

Below are the specifications of the IP_INFO_CONCAT_NULL_YIELDS_NULL option:
  •  Type: Boolean
  •  Allowed values: TRUE|FALSE
  •  Default value: FALSE (Current OpenAccess behavior)
When concatenating a string with a null value, the nullability of the result expression is the same nullability of the string expression.
If set to TRUE, when concatenating a string with a null value, the nullability of the result expression is nullable.

NOTE:
Currently this option is supported only in the pass-through mode, and for C/C++, Java, and .NET interface providers.
Last Modified Date10/11/2016 8:46 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.