Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: date insertion error
|
| 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