So we have an AIX (ugh) server that runs an ERP system. This system's built in reports suck so I am of course tasked with building the reports we need.
I've got many reports I run and most of course are for specific dates, etc. The coding is done in C# running in ASP.net on a Windows 2003 Standard Server box. It uses the Informix CSDK to connect via the .Net Data Adapter that comes with the CSDK. The server runs Informix 10 on the AIX 5.2 server.
What's weird is that anytime we start and stop Informix or reboot the server, etc, it seems that Informix decides to change the way it's handled the date via the CSDK. If it's currently expecting MM/DD/YYYY then it'll eventually decide after the above situation that is wants it in YYYY/MM/DD. This usually ends up giving me an "Invalid Month in Date" error. Then I go into my dateformat function (made to easily allow me to fall back and forth) and manually change it over. A couple reports I built in the handling of this error and then retry the same query with the other format of the date. This of course is less than ideal and I'd like to get to the bottom of it!
Here is some pasted text from the ASP.net page error. Thanks!
Server Error in '/' Application. ERROR [HY000] [Informix .NET provider][Informix]Invalid month in date Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about theerror and where it originated in the code. Exception Details: IBM.Data.Informix.IfxException: ERROR [HY000] [Informix .NET provider][Informix]Invalid month in date Source Error: Line 479: Line 480: //aUsage = new IfxDataAdapter(sSelect_Usage, conn); Line 481: aUsage.Fill(dsUsage, "Usage"); Line 482: aUsage.Dispose(); Line 483: dtUsage = dsUsage.Tables["Usage"]; Source File: D:\Inetpub\reports2.oscarwinski.com\App_Code\IMRShipClass.cs Line: 481 Stack Trace: [IfxException: ERROR [HY000] [Informix .NET provider][Informix]Invalid month in date] IBM.Data.Informix.IfxConnection.HandleError(IntPtr hHandle, SQL_HANDLE hType, RETCODE retcode) +26 IBM.Data.Informix.IfxCommand.ExecuteReaderObject(CommandBehavior behavior, String method) +654 IBM.Data.Informix.IfxCommand.ExecuteReader(CommandBehavior behavior) +117 IBM.Data.Informix.IfxCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +130 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92 IMRShipClass.Generate() in D:\Inetpub\reports2.oscarwinski.com\App_Code\IMRShipClass.cs:481 IMRShip.testIMR() in D:\Inetpub\reports2.oscarwinski.com\IMRShip.aspx.cs:114 IMRShip.btnExport2Excel_Click1(Object sender, EventArgs e) in D:\Inetpub\reports2.oscarwinski.com\IMRShip.aspx.cs:259 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082