Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:


Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,


Post your ideas

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Future consideration
Workspace Db2
Created by Guest
Created on Oct 8, 2021

IBM Data Server .Net Provider Support For Informix Types DATETIME

Hi, we are in the process of moving from .Net Framework to .Net Core.
Currently using the Net5.IBM.Data.Db2 driver connecting through the DRDA protocol.
For DATETIME data types we are having trouble searching.

A simple query is throwing the exception, example:

SELECT column FROM table (column is DATETIME YEAR TO MINUTE, SECOND OR FRACTION)

We are currently working around working with conversion
from DATETIME to "String" as follows:

SELECT TO_CHAR(column, '%Y-%m-%d %H:%M') AS column_convert FROM table

Version Informix: IBM Informix Dynamic Server Version 11.70.FC8W1GE

Error:
Specified argument was out of the range of valid values.

InnerException:
at IBM.Data.DB2Types.DB2TimeStamp..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int64 fraction, Int32 precision, Boolean bTException, Boolean WithTruncate)
at IBM.Data.Db2.DB2DataBuffer.TimeStampReadBufferData_2_DB2TimeStamp(Byte* DataBuffer, Int32 DDlen, Int32 numFractionDigits)
at IBM.Data.Db2.DB2DataBuffer.ReadTimestamp(DB2DataWrapper dataWrapper, DDEntry ddEntry)
at IBM.Data.Db2.DB2DataBuffer.GetRowData(DB2DataWrapperCollection dataWrappers, DB2DataDescriptor outputDD)
at IBM.Data.Db2.DB2DataReader.Read()

Exception:
ERROR [58005] [IBM][DB2.NET] SQL0902 An unexpected exception has occurred in Process: 3144 Thread 14 AppDomain: Name:testhost
There are no context policies. Function: DB2DataReader.Read()
CallStack: at System.Environment.get_StackTrace()
at IBM.Data.Db2.DB2ConnPool.HandleUnknownErrors(String strFncMsg, Exception exception, Boolean bThrow)
at IBM.Data.Db2.DB2DataReader.Read()
at NetCoreTests.DB2CoreToInformix.SimpleTestDatatype() in D:\tmp\bruno.santos\source\repos\NetCore\NetCoreTests\DB2CoreToInformix.cs:line 43
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at NUnit.Framework.Internal.Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
at NUnit.Framework.Internal.MethodWrapper.Invoke(Object fixture, Object[] args)
at NUnit.Framework.Internal.Commands.TestMethodCommand.InvokeTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass4_0.<PerformWork>b__0()
at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at NUnit.Framework.Internal.ContextUtils.DoIsolated(ContextCallback callback, Object state)
at NUnit.Framework.Internal.ContextUtils.DoIsolated[T](Func`1 func)
at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()
at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
at NUnit.Framework.Internal.Execution.WorkItem.Execute()
at NUnit.Framework.Internal.Execution.SimpleWorkItemDispatcher.Dispatch(WorkItem work)
at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
at NUnit.Framework.Internal.Execution.WorkItem.Execute()
at NUnit.Framework.Internal.Execution.SimpleWorkItemDispatcher.Dispatch(WorkItem work)
at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
at NUnit.Framework.Internal.Execution.WorkItem.Execute()
at NUnit.Framework.Internal.Execution.SimpleWorkItemDispatcher.Dispatch(WorkItem work)
at NUnit.Framework.Internal.Execution.CompositeWorkItem.RunChildren()
at NUnit.Framework.Internal.Execution.CompositeWorkItem.PerformWork()
at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread()
at NUnit.Framework.Internal.Execution.WorkItem.Execute()
at NUnit.Framework.Internal.Execution.SimpleWorkItemDispatcher.RunnerThreadProc()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart() InnerException Message: Specified argument was out of the range of valid values. Check InnerException property for more detail. SQLSTATE=58005
Needed By Not sure -- Just thought it was cool
  • Guest
    Reply
    |
    Feb 10, 2023

    It would be nice if IBM fixed the driver problem.

  • Guest
    Reply
    |
    Feb 10, 2023

    We were in need of this solution. Thanks for sharing with us.

    You are awesome!!!

  • Guest
    Reply
    |
    Feb 10, 2023

    The solution mentioned below helped me a lot.

    Thanks for the support.

    You guys are awesome.

  • Guest
    Reply
    |
    Feb 8, 2023

    Great Comment and thank you for the suport!

    I've check in server configuration and realy was set with GL_DATETIME='%Y-%m-%d %H:%M:%S',
    i executed in another informix instance without the configuration and the driver operated sucssefully.


    Would be a houge advance if the driver checkout if a value possed a datetime fraction and validate the result of
    datetime field.

  • Guest
    Reply
    |
    Feb 1, 2023

    For this error you may look at the global variables configurations on server.


    On exception says "at IBM.Data.DB2Types.DB2TimeStamp..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int64 fraction, Int32 precision, Boolean bTException, Boolean WithTruncate)"


    The method expect a parameter that is the range of the fraction timestamp. Maybe you DBTime or GL_DATETIME is not set with fraction and size of fraction(.%Fn) on string.


    Maybe for the driver db2 develpers could consider insert a condtion where fraction is null or without size of fraction, input a maxim value for the db usied.