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 -> ORACLE Date-Times and ADO...

ORACLE Date-Times and ADO...

From: Gordon Smith <gordon.smith_at_hydro.co.uk>
Date: Tue, 14 Jul 1998 16:18:36 +0100
Message-ID: <35ab77ea.0@ivsn03.hydro.co.uk>


Hi,

I've been successfully using ADO in conjunction with ORACLE with one annoying exception - I can't write a date and time to an ORACLE DATE type field. The following does not write the time part - anyone got any ideas?

Dim cmd As New ADODB.Command
Dim Param As ADODB.Parameter

'* Create command object.

    Set cmd.ActiveConnection = cnn

    cmd.Prepared = True
    cmd.CommandText = sSQL
    cmd.CommandType = adCmdText

'* Set Stored Procedure Return Value and Input Parameters
    'also tried Set Param = cmd.CreateParameter("Date1", adDate, adParamInput)

    Set Param = cmd.CreateParameter("Date1", adDBTimeStamp, adParamInput)

    cmd.Parameters.Append Param

    cmd.Parameters(0).Value = = Format(dtFrom + lloop, "DD-MMM-YYYY") & " " & Format(dtTime, "hh:nn:ss")

    cmd.Execute , , adCmdText

Thanks

Gordon Smith Received on Tue Jul 14 1998 - 10:18:36 CDT

Original text of this message

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