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

From: Big George <jbeteta_at_gmail.com>
Date: Fri, 6 Jan 2012 15:52:23 -0800 (PST)
Message-ID: <dde08435-cd45-48f0-992b-d48d5e39bcf3_at_v14g2000yqh.googlegroups.com>



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. Received on Fri Jan 06 2012 - 17:52:23 CST

Original text of this message