Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NLS_DATE_FORMAT questions
Glen A Stromquist wrote:
> Sybrand Bakker wrote: > >> On Mon, 29 Jul 2002 17:51:04 GMT, Glen A Stromquist >> <glen_stromquist_at_nospam.yahoo.com> wrote: >>
>> >> Changing init.ora is not going to help. >> Your problem is at the client side, on session level. >> You need to set NLS_DATE_FORMAT in the win2k registry a string >> variable in HKLM\software\oracleHKLM\software\oracle >> The best solution though is always use an explicit date mask in all >> your code and stop relying on the client's setting. I had a complete >> export failing once because of this. The developers didn't use a date >> mask on the default clause of a column definition. The nls_date_format >> on the server was different from that on the client. >> This was the table all other tables were referring to. >> >> Hth >> >> >> >> Sybrand Bakker, Senior Oracle DBA >> >> To reply remove -verwijderdit from my e-mail address > > thanks Sybrand - I did try adding that string variable, but I put it in > the HOME0 folder under HKLM\software\oracle and it stopped the ODBC from > connecting at all. I'll try what you said and post the results back. > > btw - any idea why sqlplus in windows acts the way I described, and > sqlplus in linux seems to work as it should? > > TIA
OK tried adding the string NLS_DATE_FORMAT='dd-mon-yyyy' in to the HKLM/software/oracle in the registry, to no avail. Tried both 'dd-mon-yyyy' and 'dd-mon-rrrr', without and without single & double quotes. I am trying oracles ODBC test utility, connecting thru the odbc driver returns SQL_ERROR=-1 anytime the 4 digit year is used when querying one of the app's tables, with SQL_SUCCESS=0 anytime a 2 digit year is used. So the app's connection is still expecting a 2 digit year for some reason.
On the sqlplus side, after some more checking I see that the session parameter is set at dd-mon-rr, hence it's behaviour when querying. Received on Mon Jul 29 2002 - 14:42:02 CDT