Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: date insertion error

Re: date insertion error

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Tue, 25 Nov 2003 08:20:49 -0500
Message-ID: <ydWdnbrm7PfVyl6iRVn-hA@comcast.com>


|
| The first thing you do after connecting to oracle in the VB app:
| alter session set nls_date_format='DD-MON-YYYY';
|
| ... or whatever date format you like to have in your application as long
| as you use that format when you code against the database.
|
| The nls_date_format can be set in several different places. The alter
| session overrides them all.
|
|
|
|
| Janne
|

be careful with the ALTER SESSION unless you're in an environtment with good coding standards

until last month i used to advocate basically the same thing -- i'd include an ALTER SESSION in the startup code of my packages to ensure that the date format for my package was what i expected

however, we started to get intermittent errors in some of the other packages -- turned out the other developers were doing implicit date conversion, which usually worked, but when their code was run in a shared session (9iAS) that my code had been run in, they would get conversion errors

so ALTER SESSION is good if EVERYBODY does it -- perhaps including it in the authentication code, but definitely making it part of the QA process

Received on Tue Nov 25 2003 - 07:20:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US