Problem with case statement.

string select_statement = "SELECT RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA FROM TBRECEIPTS";
string DateString1 = ActiveDateTime3.Date.Day.ToString() + "-" + ActiveDateTime3.Date.Month.ToString() + "-" + ActiveDateTime3.Date.Year.ToString();
string DateString2 = ActiveDateTime4.Date.Day.ToString() + "-" + ActiveDateTime4.Date.Month.ToString() + "-" + ActiveDateTime4.Date.Year.ToString();

                  
switch (Group_RadioButtonList.SelectedIndex)
{
      case 0:
                select_statement += " Where RC_PAYMNB='" + txtPayment.Text + "'";
      break;
      case 1:
                select_statement += " Where RC_CASHNB='" + txtCashier.Text + "'";
      break;
       case 2:
                select_statement += " Where To_Date(RC_DATE, 'dd-mm-yyyy') <= '" + DateString2.ToString() + "' And To_Date(RC_DATE, 'dd-mm-yyyy') >= '" + DateString1.ToString() + "'";
//      Response.Write (select_statement);
                break;
      default : return;
}

"SELECT RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA FROM TBRECEIPTS Where To_Date(RC_DATE, 'dd-mm-yyyy') <= '1-11-2004' And To_Date(RC_DATE, 'dd-mm-yyyy') >= '1-10-2004'"

I get the following error:

ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month

Source Error:


Line 266:                  OdbcDataAdapter myDataAdapter = new OdbcDataAdapter(strSQLDDL,myConnection);
Line 267:                  ddlDataSet1.Clear();  
Line 268:                  myDataAdapter.Fill(ddlDataSet1);
Line 269:                  myDataAdapter.Dispose();
Line 270:                  myDataAdapter = null;
 

Source File: d:\inetpub\wwwroot\mspos\receipts.aspx.cs    Line: 268

Stack Trace:


[OdbcException: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month
]
   System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode) +32
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method) +1189
   System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) +48
   System.Data.Odbc.OdbcCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
   MSPOS.Receipt.btnRunQuery_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\mspos\receipts.aspx.cs:268
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1266

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Request Details
Session Id: l4wtwqffyghanj45tpuxxi45 Request Type: POST
Time of Request: 11/1/2004 3:08:41 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init  
aspx.page End Init 0.000082 0.000082
aspx.page Begin LoadViewState 0.000111 0.000029
aspx.page End LoadViewState 0.000455 0.000344
aspx.page Begin ProcessPostData 0.000478 0.000023
aspx.page End ProcessPostData 0.000601 0.000123
aspx.page Begin ProcessPostData Second Try 0.000643 0.000042
aspx.page End ProcessPostData Second Try 0.000665 0.000023
aspx.page Begin Raise ChangedEvents 0.000695 0.000030
aspx.page End Raise ChangedEvents 0.000714 0.000019
aspx.page Begin Raise PostBackEvent 0.000730 0.000016
Unhandled Execution Error
ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month

  at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
  at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
  at System.Data.Odbc.OdbcCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
  at MSPOS.Receipt.btnRunQuery_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\mspos\receipts.aspx.cs:line 268
  at System.EventHandler.Invoke(Object sender, EventArgs e)
  at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
  at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain() 0.134705 0.133975
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size Bytes (excluding children)
Cookies Collection
Name Value Size
ASP.NET_SessionId l4wtwqffyghanj45tpuxxi45 42
Headers Collection
Name Value
Cache-Control no-cache
Connection Keep-Alive
Content-Length 730
Content-Type application/x-www-form-urlencoded
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Authorization Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP
Cookie ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45
Host localhost
Referer http://localhost/MSPOS/Receipts.aspx 
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
Form Collection
Name Value
__VIEWSTATE dDwxMTUyMzA5MDMwO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDExPjtpPDEzPjtpPDE3Pjs+O2w8dDxwPGw8X2RhdGU7PjtsPFN5c3RlbS5EYXRlVGltZSwgbXNjb3JsaWIsIFZlcnNpb249MS4wLjUwMDAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5PDIwMDQtMTEtMDE+Oz4+Ozs+O3Q8cDxsPF9kYXRlOz47bDw1MDwyMDA0LTExLTAxPjs+Pjs7Pjt0PEAwPDs7Ozs7Ozs7Ozs+Ozs+Oz4+Oz4+O2w8TWFpbk1lbnU7TG9nb3V0MTppYm5Mb2dvdXQ7Pj58Y6Zc1sC9OSsp5s0upk7UXTuV7g==
Group_RadioButtonList StartDate
txtPayment  
txtCashier  
ActiveDateTime3 632348640000000000
ActiveDateTime3_day 1
ActiveDateTime3_month 10
ActiveDateTime3_year 2004
ActiveDateTime4 632348640000000000
ActiveDateTime4_day 1
ActiveDateTime4_month 11
ActiveDateTime4_year 2004
btnRunQuery Run Query
Server Variables
Name Value
ALL_HTTP HTTP_CACHE_CONTROL:no-cache HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:730 HTTP_CONTENT_TYPE:application/x-www-form-urlencoded HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-us HTTP_AUTHORIZATION:Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP HTTP_COOKIE:ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45 HTTP_HOST:localhost HTTP_REFERER:http://localhost/MSPOS/Receipts.aspx HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)  
ALL_RAW Cache-Control: no-cache Connection: Keep-Alive Content-Length: 730 Content-Type: application/x-www-form-urlencoded Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* Accept-Encoding: gzip, deflate Accept-Language: en-us Authorization: Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP Cookie: ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45 Host: localhost Referer: http://localhost/MSPOS/Receipts.aspx User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)  
APPL_MD_PATH /LM/W3SVC/1/Root/MSPOS
APPL_PHYSICAL_PATH D:\Inetpub\wwwroot\MSPOS\
AUTH_TYPE  
AUTH_USER  
AUTH_PASSWORD  
LOGON_USER OMEGAMACHINE\Administrator
REMOTE_USER  
CERT_COOKIE  
CERT_FLAGS  
CERT_ISSUER  
CERT_KEYSIZE  
CERT_SECRETKEYSIZE  
CERT_SERIALNUMBER  
CERT_SERVER_ISSUER  
CERT_SERVER_SUBJECT  
CERT_SUBJECT  
CONTENT_LENGTH 730
CONTENT_TYPE application/x-www-form-urlencoded
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE  
HTTPS_SECRETKEYSIZE  
HTTPS_SERVER_ISSUER  
HTTPS_SERVER_SUBJECT  
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /MSPOS/Receipts.aspx
PATH_TRANSLATED D:\Inetpub\wwwroot\MSPOS\Receipts.aspx
QUERY_STRING  
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 3025
REQUEST_METHOD POST
SCRIPT_NAME /MSPOS/Receipts.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/6.0
URL /MSPOS/Receipts.aspx
HTTP_CACHE_CONTROL no-cache
HTTP_CONNECTION Keep-Alive
HTTP_CONTENT_LENGTH 730
HTTP_CONTENT_TYPE application/x-www-form-urlencoded
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_AUTHORIZATION Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP
HTTP_COOKIE ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45
HTTP_HOST localhost
HTTP_REFERER http://localhost/MSPOS/Receipts.aspx 
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)

mathieu_cuprykAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bukkoCommented:
Maybe this should be in the C# section.
What exactly is the question?
0
mathieu_cuprykAuthor Commented:
The question is that it is not working on dd-mm-yyyy format
it is expecting mm-dd-yyyyy.
0
sigmaconCommented:
It's actually an Oracle question:

Oracle is pretty good at parsing dates when using To_Date(), so try first whether just providing Date.ToString() would work before changing things around. The following may work only uf RC_DATE is a true date column

e.g.

Where RC_DATE <= To_Date('" + ActiveDateTime3.Date.ToString() + "') And RC_DATE >= To_Date('" + ActiveDateTime4.Date.ToString() + "')";
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mathieu_cuprykAuthor Commented:
The problem is that it is a varchar2(19) and the format for now is dd-mm-yyyyy
I will increase the points to 1000.
0
sigmaconCommented:
Well, did you try it first?

If it doesn't work, try:

Where To_Date(RC_DATE) <= To_Date('" + ActiveDateTime3.Date.ToString() + "') And To_Date(RC_DATE) >= To_Date('" + ActiveDateTime4.Date.ToString() + "')";

Direct string comparison is not going to work, for that your RC_DATE would need to be of format YYYY-MM-DD

You really should store dates as dates and not as strings, or at least as YYYY-MM-DD or YYYYMMDD (first one is preferred)
0
mathieu_cuprykAuthor Commented:
There is some mistake in here

string select_statement = "SELECT RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA FROM TBRECEIPTS";
string DateString1 = ActiveDateTime3.Date.Day.ToString() + "-" + ActiveDateTime3.Date.Month.ToString() + "-" + ActiveDateTime3.Date.Year.ToString();
string DateString2 = ActiveDateTime4.Date.Day.ToString() + "-" + ActiveDateTime4.Date.Month.ToString() + "-" + ActiveDateTime4.Date.Year.ToString();

Where To_Date(RC_DATE) <= To_Date('" + ActiveDateTime3.Date.ToString() + "') And To_Date(RC_DATE) >= To_Date('" + ActiveDateTime4.Date.ToString() + "')";

0
sigmaconCommented:
What's the error message?

I meant for you to replace this:

select_statement += " Where To_Date(RC_DATE, 'dd-mm-yyyy') <= '" + DateString2.ToString() + "' And To_Date(RC_DATE, 'dd-mm-yyyy') >= '" + DateString1.ToString() + "'";

with this:

select_statement += " Where To_Date(RC_DATE) <= To_Date('" + ActiveDateTime3.Date.ToString() + "') And To_Date(RC_DATE) >= To_Date('" + ActiveDateTime4.Date.ToString() + "')";
0
mathieu_cuprykAuthor Commented:
Come on. I will increase it to 1500.

Server Error in '/MSPOS' Application.
--------------------------------------------------------------------------------

ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month

Source Error:


Line 265:                  OdbcDataAdapter myDataAdapter = new OdbcDataAdapter(strSQLDDL,myConnection);
Line 266:                  ddlDataSet1.Clear();  
Line 267:                  myDataAdapter.Fill(ddlDataSet1);
Line 268:                  myDataAdapter.Dispose();
Line 269:                  myDataAdapter = null;
 

Source File: d:\inetpub\wwwroot\mspos\receipts.aspx.cs    Line: 267

Stack Trace:


[OdbcException: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month
]
   System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode) +32
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method) +1189
   System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) +48
   System.Data.Odbc.OdbcCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
   MSPOS.Receipt.btnRunQuery_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\mspos\receipts.aspx.cs:267
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1266

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Request Details
Session Id: l4wtwqffyghanj45tpuxxi45 Request Type: POST
Time of Request: 11/1/2004 4:01:49 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init  
aspx.page End Init 0.000096 0.000096
aspx.page Begin LoadViewState 0.000125 0.000030
aspx.page End LoadViewState 0.000466 0.000340
aspx.page Begin ProcessPostData 0.000490 0.000025
aspx.page End ProcessPostData 0.000610 0.000120
aspx.page Begin ProcessPostData Second Try 0.000635 0.000025
aspx.page End ProcessPostData Second Try 0.000672 0.000037
aspx.page Begin Raise ChangedEvents 0.000689 0.000018
aspx.page End Raise ChangedEvents 0.000707 0.000018
aspx.page Begin Raise PostBackEvent 0.000724 0.000016
Unhandled Execution Error
ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month

  at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
  at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
  at System.Data.Odbc.OdbcCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
  at MSPOS.Receipt.btnRunQuery_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\mspos\receipts.aspx.cs:line 267
  at System.EventHandler.Invoke(Object sender, EventArgs e)
  at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
  at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain() 0.082283 0.081559
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size Bytes (excluding children)
Cookies Collection
Name Value Size
ASP.NET_SessionId l4wtwqffyghanj45tpuxxi45 42
Headers Collection
Name Value
Cache-Control no-cache
Connection Keep-Alive
Content-Length 730
Content-Type application/x-www-form-urlencoded
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Authorization Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP
Cookie ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45
Host localhost
Referer http://localhost/MSPOS/Receipts.aspx 
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
Form Collection
Name Value
__VIEWSTATE dDwxMTUyMzA5MDMwO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDExPjtpPDEzPjtpPDE3Pjs+O2w8dDxwPGw8X2RhdGU7PjtsPFN5c3RlbS5EYXRlVGltZSwgbXNjb3JsaWIsIFZlcnNpb249MS4wLjUwMDAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5PDIwMDQtMDktMDk+Oz4+Ozs+O3Q8cDxsPF9kYXRlOz47bDw1MDwyMDA0LTExLTExPjs+Pjs7Pjt0PEAwPDs7Ozs7Ozs7Ozs+Ozs+Oz4+Oz4+O2w8TWFpbk1lbnU7TG9nb3V0MTppYm5Mb2dvdXQ7Pj5ERCFll0M682VOSaFmgMePv6bkCw==
Group_RadioButtonList StartDate
txtPayment  
txtCashier  
ActiveDateTime3 632302848000000000
ActiveDateTime3_day 9
ActiveDateTime3_month 9
ActiveDateTime3_year 2004
ActiveDateTime4 632357280000000000
ActiveDateTime4_day 11
ActiveDateTime4_month 11
ActiveDateTime4_year 2004
btnRunQuery Run Query
Server Variables
Name Value
ALL_HTTP HTTP_CACHE_CONTROL:no-cache HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:730 HTTP_CONTENT_TYPE:application/x-www-form-urlencoded HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-us HTTP_AUTHORIZATION:Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP HTTP_COOKIE:ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45 HTTP_HOST:localhost HTTP_REFERER:http://localhost/MSPOS/Receipts.aspx HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)  
ALL_RAW Cache-Control: no-cache Connection: Keep-Alive Content-Length: 730 Content-Type: application/x-www-form-urlencoded Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* Accept-Encoding: gzip, deflate Accept-Language: en-us Authorization: Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP Cookie: ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45 Host: localhost Referer: http://localhost/MSPOS/Receipts.aspx User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)  
APPL_MD_PATH /LM/W3SVC/1/Root/MSPOS
APPL_PHYSICAL_PATH D:\Inetpub\wwwroot\MSPOS\
AUTH_TYPE  
AUTH_USER  
AUTH_PASSWORD  
LOGON_USER OMEGAMACHINE\Administrator
REMOTE_USER  
CERT_COOKIE  
CERT_FLAGS  
CERT_ISSUER  
CERT_KEYSIZE  
CERT_SECRETKEYSIZE  
CERT_SERIALNUMBER  
CERT_SERVER_ISSUER  
CERT_SERVER_SUBJECT  
CERT_SUBJECT  
CONTENT_LENGTH 730
CONTENT_TYPE application/x-www-form-urlencoded
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE  
HTTPS_SECRETKEYSIZE  
HTTPS_SERVER_ISSUER  
HTTPS_SERVER_SUBJECT  
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR 127.0.0.1
PATH_INFO /MSPOS/Receipts.aspx
PATH_TRANSLATED D:\Inetpub\wwwroot\MSPOS\Receipts.aspx
QUERY_STRING  
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT 2298
REQUEST_METHOD POST
SCRIPT_NAME /MSPOS/Receipts.aspx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/6.0
URL /MSPOS/Receipts.aspx
HTTP_CACHE_CONTROL no-cache
HTTP_CONNECTION Keep-Alive
HTTP_CONTENT_LENGTH 730
HTTP_CONTENT_TYPE application/x-www-form-urlencoded
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_AUTHORIZATION Negotiate TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUCzg4AAAAP
HTTP_COOKIE ASP.NET_SessionId=l4wtwqffyghanj45tpuxxi45
HTTP_HOST localhost
HTTP_REFERER http://localhost/MSPOS/Receipts.aspx 
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
0
sigmaconCommented:
The maximum points for a question are 500. You may have to close this here and ask the question in the Oracle or C# forum.
0
mathieu_cuprykAuthor Commented:
I will open another.
0
SoftEng007Commented:
verify that To_Date(RC_DATE, 'dd-mm-yyyy') returns valid dates for all rows in the range.
you may have some bad data.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.