Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Passing date value from VB to Oracle Stored Procedure
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. Received on Wed Mar 25 1998 - 00:00:00 CST