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

Home -> Community -> Mailing Lists -> Oracle-L -> Re:Slightly off topic: does Java or Pro*C "prepare" hit Orac

Re:Slightly off topic: does Java or Pro*C "prepare" hit Orac

From: <dgoulet_at_vicr.com>
Date: Thu, 14 Dec 2000 11:24:08 -0500
Message-Id: <10710.124578@fatcity.com>


Val,

    I can't speak for Java and ADO, but in C (either OCI or Pro*C) the database hit occurs only with the 'open' statement. Prepare does not do anything with the database, only the local memory.

Dick Goulet

____________________Reply Separator____________________
Subject: Slightly off topic: does Java or Pro*C "prepare" hit Oracle? Author: Val_Gamerman/Victoria_Financial.VICTORIA_FINANCIAL_at_lnn.com Date: 12/14/2000 7:50 AM

Hello,

An argument has raisen in the office about prepared statements.

In many languages (e.g. Pro*C, Java, ADO, etc.) in order to use bind variables and allow for SQL sharing the notion of prepared statements was introduced (a very long time ago).

The question is, when I issue a prepare from any of these languages does the underlying library/driver hit the database?

E.g. If I issue connection.PrepareStatement("SELECT * FROM EMP WHERE EMPID = ?"); in Java, is it actually going to hit Oracle with this statement at this time or when I actually execute the query?

If anybody has any thoughts, knows for sure or has some ideas, please do not hesitate to send them over.

Thanks,
Val Gamerman.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Val_Gamerman/Victoria_Financial.VICTORIA_FINANCIAL_at_lnn.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Dec 14 2000 - 10:24:08 CST

Original text of this message

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