Re: VB - API call to execute procedure, not using bind variables?
Date: Mon, 27 Oct 2008 21:05:50 +0100
On Mon, 27 Oct 2008 11:10:36 -0700 (PDT), Dave <David.C.Watson_at_gmail.com> wrote:
>We are executing the below statement through a visual basic API and
>it's executing the SP with the literal values instead of bind
>variables, thus filling up our library cache with multiple unique
>statements and hard parsing over and over and over again...
>Does anyone know how we can change the code in VB to pass it to Oracle
>and use bind variables?
>SCHEMA.STORED_PROC('" & v_ID & "', '" & CStr(Format(v_RepBeginDate,
>"dd-MMM-yyyy")) & "', '" & CStr(Format(v_RepEndDate, "dd-MMM-yyyy")) &
>"', " & sched_def_inst & ");
You don't specify which driver you are using so no exact answer is
The ODBC API is online, generally speaking you replace the actual value by a question mark and you issue set parameter calls. As to ODP and OLE Oracle has several tutorials on line at http://otn.oracle.com . free registration required. Hit the tutorial tab first.
Also http://asktom.oracle.com might have examples, as well as Oramag.
-- Sybrand Bakker Senior Oracle DBAReceived on Mon Oct 27 2008 - 15:05:50 CDT