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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Update a date field using ADO

Re: Update a date field using ADO

From: Keith Jamieson <Keith.Jamieson_at_phoenix.ie>
Date: Mon, 22 Oct 2001 11:25:43 +0100
Message-ID: <9r0s1l$5n2$1@kermit.esat.net>


I generally take the approach of having both the date and the oracle date format mask passed in as strings, and then convert them using to_date. This way, it doesn't matter what the nls_date_format is set to.

Alexei VORONOV wrote in message <9qmhdl$hlr$1_at_wanadoo.fr>...
>probably you can try to set NLS_DATE_FORMAT for the session (alter session
>stmt), and after give the formatted string instead of using UTC.
>For exapmle:
>altersession set NLS_DATE_FORMAT='DD/MM/YYYY HH24:MI:SS'
>
>rs.Fields("data_nascita").Value="31/7/2002 23:15:00";
>
>"Francesco" <jazz74_removeThis_at_infinito.it> a écrit dans le message news:
>9qmad1$hpm$1_at_fe2.cs.interbusiness.it...
>> Hi everybody, that's the big trouble: I use ADO with oracle (using OLEDB
>> connection), and I get an error while I try to update a date field:
>> checkData() return a Date in UTC format. (Wed Jul 31 00:00:00 UTC+0200
>2002)
>>
>> var rs=Server.CreateObject("ADODB.recordset");
>> rs.Open("select * from TABLE where PK_FIELD=100000",cn);
>> rs.Fields("data_nascita").Value=checkData("31/7/2002");
>> rs.Update();
>> rs.Close;
>>
>> Where can I find good articles or forums about using ADO with Oracle?
>> Thanks in advance.
>>
>> Francesco
>>
>>
>
>
Received on Mon Oct 22 2001 - 05:25:43 CDT

Original text of this message

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