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: Passing date value from VB to Oracle Stored Procedure

Re: Passing date value from VB to Oracle Stored Procedure

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/03/26
Message-ID: <6fdl0a$bq2$6@news01.btx.dtag.de>#1/1

On Wed, 25 Mar 1998 09:38:16 -0500, Melinda Schall <melinda.schall_at_DaytonOH.NCR.Com> wrote: Hi,

you must specify parameter type. See my posting from yesterday.

>I didn't have this information to post yesterday to help clarify
>my question. So, now that I do, here's a sample piece of our
>code. We're using VB 4.0 with Oracle Objects for OLE.
>
>I just included the lines dealing with the date; the missing
>stuff is just more parameters.
>
>......more parameters.....
>CFLS.OracleDatabaseHandle.Parameters.Add "EXPIRE_DATE",
>Format(ExpirationDateLabel, "MM/DD/YYYY"), ORAPARM_INPUT
>.....more parameters.....
>
>sSql = "Begin example_proc "
>sSql = sSql + "(:MORE_PARAMS, :EXPIRE_DATE, :MORE_PARAMS); end;"
>
>' trap error from stored procedure variable
>On Error GoTo 0
>CFLS.OracleDatabaseHandle.DbExecuteSQL (sSql)
>
>....error handling.....
>
>If you want to e-mail me directly replace the no.one in my
>e-mail address with melinda.schall.
>
>Thanks again, Melinda
>
>=========="Melinda Schall", 3/24/98==========
>
>
>Our developers are trying to pass a date value from VB to an
>Oracle Stored
>Procedure and it is not working. The stored procedure's input
>parameter is
>defined as DATE. The VB code wants to pass the date format of
>MM/DD/YYYY.
>I've tried having them pass the value as a string containing the to_date
>function, i.e. to_date(vb_date, 'MM/DD/YYYY'), to the stored
>procedure but
>this fails as well. It seems like there must be a simple/obvious thing
>wrong...but it's eluding me and the other database developers here.
>
>Thanks in advance for any information.
>
>

--

Regards

Matthias Gresz    :-)

GreMa_at_T-online.de
Received on Thu Mar 26 1998 - 00:00:00 CST

Original text of this message

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