Informix - Problem description
Problem IT39979 | Status: Closed |
.NET CORE: SYSTEM.NULLREFERENCEEXCEPTION THROWN CALLING GETDECIMAL() | |
product: | |
IBM CSDK / 5724C2381 / 450 - CSDK 4.50 | |
Problem description: | |
When making a call to GetDecimal(), the following exception can be seen: D:\'Infx\'work\'cs\'core\'p>dotnet run [ERROR] - Type: System.NullReferenceException - Message: Object reference not set to an instance of an object. - Stack Trace: at Informix.Net.Core.IfxDataReader.GetDecimal(Int32 i) using System; using System.IO; using System.Data; using System.Text; using Informix.Net.Core; using System.Globalization; namespace MyConsoleApp { class Program { static void Main(string[] args) { CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("de-DE"); IfxConnection conn; try { conn = new IfxConnection("server=ids1410;database=sysmaster;"); conn.Open(); IfxCommand ifxcmd = conn.CreateCommand(); IfxCommand cmmd = conn.CreateCommand(); cmmd.CommandText = "SELECT '1.0'::decimal"; IfxDataReader drdr; drdr = cmmd.ExecuteReader(); while (drdr.Read()) { if (drdr.IsDBNull(0)) Console.WriteLine("null"); else Console.WriteLine($"\'tGetDecimal: {drdr.GetDecimal(0)}"); } drdr.Close(); conn.Close(); } catch (Exception ex) { Console.Error.WriteLine($"[ERROR] - Type: {ex.GetType()} - Message: {ex.Message} - Stack Trace: {ex.StackTrace}"); } } } } | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of Informix Client SDK prior to version 4.50.FC8. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Informix Client SDK 4.50.FC8. * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * Users of Informix Client SDK prior to version 4.50.FC8. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Informix Client SDK 4.50.FC8. * **************************************************************** | |
Comment | |
Fixed in Informix Client SDK 4.50.FC8. | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 15.02.2022 07.04.2022 07.04.2022 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |