Issue when trying to insert the values in to oracle database

When I am trying to run the application which inserts the the incoming invoices in to the database. I am getting the below error

A message sent to adapter "WCF-Custom" on send port "WcfSendPort_OracleDBBinding_Table_MACINVOICE_Custom" with URI "oracledb://c0xlp0.world/" is suspended.
 Error details: System.ArgumentException: ORA-1843: not a valid month

It is not showing me which field is throwing the error. I tried checking all the date field in the map and I am using

return DateTime.Today.ToString("s");
to two fields and
return new DateTime(1700, 1, 1).ToString("s");
other date fields. How do I troubleshoot where the error is occurring. Any help is greatly appreciated. Thanks
August 28th, 2015 2:17pm

Hi Vdha,

To find the issue.

You are sending two different formats, one is supporting other is having issue.

- 1st try with sending "2015-08-28T00:00:00"

- 2nd try with "1/1/1700 12:00:00 AM"

you will get the difference.

System.Console.WriteLine(DateTime.Today.ToString("s"));
            2015-08-28T00:00:00
                
System.Console.WriteLine(new DateTime(1700, 1, 1));
            1/1/1700 12:00:00 AM
Thanks, SMSVikasK
Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 2:55pm

You entered a date, but the month portion of the date was not a valid month.

The error is due to the month, try:

TO_DATE(A, 'DD/MM/YYYY')

Or Refer link

http://www.techonthenet.com/oracle/errors/ora01843.php

August 28th, 2015 3:14pm

Hi,

True!!

You are sending 2 different date time formats. Generate the Output by using "test map" and whatever values you are getting try to insert it manually into Oracle DB table by using Insert Command. 

It will give you the exact error. 

Rahul

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 3:52pm

Hi,

True!!

You are sending 2 different date time formats. Generate the Output by using "test map" and whatever values you are getting try to insert it manually into Oracle DB table by using Insert Command. 

It will give you the exact error. 

Rahul

  • Marked as answer by vdha 18 hours 25 minutes ago
August 28th, 2015 7:49pm

Hi,

True!!

You are sending 2 different date time formats. Generate the Output by using "test map" and whatever values you are getting try to insert it manually into Oracle DB table by using Insert Command. 

It will give you the exact error. 

Rahul

  • Marked as answer by vdha Monday, August 31, 2015 12:41 PM
Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 7:49pm

Hi,

True!!

You are sending 2 different date time formats. Generate the Output by using "test map" and whatever values you are getting try to insert it manually into Oracle DB table by using Insert Command. 

It will give you the exact error. 

Rahul

  • Marked as answer by vdha Monday, August 31, 2015 12:41 PM
August 28th, 2015 7:49pm

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 12:23am

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


August 29th, 2015 4:20am

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 4:20am

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


August 29th, 2015 4:20am

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 4:20am

Hi ,

You are getting a conversion error . The Oracle database is expecting data to send in correct date time format.

Use scripting functoids  and pass the node value to get data in correct format .Sample code could be like below

DateTime.ParseExact(datetimevariable, "dd/MMM/yyyy", CultureInfo.InvariantCulture)

You can refer multiple articles over bing with same  exception code returned from Oracle.

http://stackoverflow.com/questions/1567104/got-ora-01843-when-i-try-to-insert-date-time-to-oracle

http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

Thanks

Abhishek


August 29th, 2015 4:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics