dbTalk Databases Forums  

My web app sends date like "06/01/2012" but Oracle tries to get itlike '06/JAN/12'

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss My web app sends date like "06/01/2012" but Oracle tries to get itlike '06/JAN/12' in the comp.databases.oracle.misc forum.

Reply
 
Thread Tools Display Modes
  #1  
Old   
Big George
 
Posts: n/a

Default My web app sends date like "06/01/2012" but Oracle tries to get itlike '06/JAN/12' - 01-06-2012 , 06:52 PM






Hello,

My asp.net web app uses ODP.NET 10.1.0.400 to connect to an Oracle 11g
or Oracle 10g database.

I got error with dates for both databases. This is the case:

My web app calls send parameters to a stored procedure:

ospEntry(0) = New spEntry("i_userid", sUserid, OracleDbType.Varchar2,
50)
ospEntry(1) = New spEntry("i_Date", "01/06/2012", OracleDbType.Date,
8)
conOP.Open()
CallSP("pkg_Users.SP_Insert_Login_Out", conOP, ospEntry, , , , 0)

It gets error:
ora-01843: not a valid month

But if I send this value:
ospEntry(1) = New spEntry("i_Date", "01/JAN/2012", OracleDbType.Date,
8)

I got no problem.

I think it's a problem of Regional and Language Options on my IIS
server. If I run my web app from my PC, there's no problem with value
"01/06/2012". My PC is Windows XP with Regional and Language
configuration set in Spanish.

On my IIS server, if I command this:

C:> date
The current date is: 06/01/2012

As you see, it seems that date format on this server is OK.

I think maybe there is some missing settings on the ODP.NET.


Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: My web app sends date like "06/01/2012" but Oracle tries to getit like '06/JAN/12' - 01-09-2012 , 05:15 PM






On Jan 6, 3:52*pm, Big George <jbet... (AT) gmail (DOT) com> wrote:
Quote:
Hello,

My asp.net web app uses ODP.NET 10.1.0.400 to connect to an Oracle 11g
or Oracle 10g database.

I got error with dates for both databases. This is the case:

My web app calls send parameters to a stored procedure:

ospEntry(0) = New spEntry("i_userid", sUserid, OracleDbType.Varchar2,
50)
ospEntry(1) = New spEntry("i_Date", "01/06/2012", OracleDbType.Date,
8)
conOP.Open()
CallSP("pkg_Users.SP_Insert_Login_Out", conOP, ospEntry, , , , 0)

It gets error:
ora-01843: *not a valid month

But if I send this value:
ospEntry(1) = New spEntry("i_Date", "01/JAN/2012", OracleDbType.Date,
8)

I got no problem.

I think it's a problem of Regional and Language Options on my IIS
server. If I run my web app from my PC, there's no problem with value
"01/06/2012". My PC is Windows XP with Regional and Language
configuration set in Spanish.

On my IIS server, if I command this:

C:> date
The current date is: 06/01/2012

As you see, it seems that date format on this server is OK.

I think maybe there is some missing settings on the ODP.NET.
I dunno. http://bit.ly/zPixf3

jg
--
@home.com is bogus.
http://www.utsandiego.com/news/2012/...ctronics-show/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.