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

From: joel garry <joel-garry_at_home.com>
Date: Mon, 9 Jan 2012 14:15:24 -0800 (PST)
Message-ID: <f0532cc2-9d0c-44e0-8121-0ab3d35f1975_at_y12g2000yqc.googlegroups.com>



On Jan 6, 3:52 pm, Big George <jbet..._at_gmail.com> wrote:
> 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

--
_at_home.com is bogus.
http://www.utsandiego.com/news/2012/jan/06/hot-technology-spark-consumer-electronics-show/
Received on Mon Jan 09 2012 - 16:15:24 CST

Original text of this message