Using Statement rather than CallableStatement for stored proc execution

Cleary, if you need to extract output parameters from a stored procedure, then you must use a CallableStatement to execute it. However, if your stored procedure just returns a basic ResultSet, or performs a database update, is there any penalty to using a regular Statement to execute the stored procedure?
For example -
String sql = "exec testprocedure 'param1' 'param2'";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery( sql );
vs.
CallableStatement cs = conn.prepareCall( "{call testprocedure(?,?)}" );
cs.setString( 1, "param1" );
cs.setString( 2, "param2" );
ResultSet rs = cs.executeQuery();
Any thoughts?

Any thoughts?You would have to look at the actual driver code for a sure answer.
But for any real database (which a stored proc suggests) I doubt there would be any difference at all. It would resolve to the same call.

Similar Messages

  • [svn:fx-3.x] 9493: Applying patch (SDK-22435) submitted by Aaron Boushley which updates ObjectUtil to use toXMLString rather than toString for XML objects .

    Revision: 9493
    Author:   [email protected]
    Date:     2009-08-23 16:09:56 -0700 (Sun, 23 Aug 2009)
    Log Message:
    Applying patch (SDK-22435) submitted by Aaron Boushley which updates ObjectUtil to use toXMLString rather than toString for XML objects.
    QE notes:  None
    Doc notes: None
    Bugs: SDK-13919
    Reviewer: N/A
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22435
        http://bugs.adobe.com/jira/browse/SDK-13919
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/utils/ObjectUtil.as

  • Why won't Compressor let me submit? And why use compressor rather than FCP?

    Hey I'm using Compressor with Final Cut Hd and a Powermac g5.
    So from Final Cut I've gone to 'Export' using 'Using Compressor', for a piece of Quicktime that I want to convert to Mpeg 4. IN compressor, I've set a MPEG 4 conversion, and I've set a destination. But the 'submit' button hasn't come on, and I can't go ahead with the operation. Can anyone tell me the basic things that would prevent me going ahead with the conversion here - no matter how obvious? I'm a new user, and I don't know what I'm doing wrong... any hints?
    Secondly, why do I need to use compressor for this - what's the advantage of using Compressor rather than using the QTconversion panel export from Final Cut Pro?
    Thanks for your help with these issues - you guys rock!
    Best
    Richard

    You may not have enough free hard drive spacein your destination folder or your destination folder is Write protected. I've had that problem and compressor will not always tell you why its not giving you the ok to submit yu kind of have to figure it out. *** far as the benifit of useing it the only rel one is that you can continue to use final cut to do other work while compressor is working, ut that only works if you first export it as a fcp Quick time move and then open compressor and drag and drop the fcp full dv or hdv quick time movie into compressor for compression. affter that you can quite compressor without even saving it and it will continue to work in the background only using what ever cpu power you aren't using allowing you to continue to work on other parts or projects.

  • CRS Install hostname being used by more than once for the same node.

    Hi, we're installing The Oracle Clusterware and on the Cluster Configuration screen of the universal Installer (the one were you specify the clustername and clusternodes) we get the following error message in a dialog box when the next button is clicked:
    "You must enter unique values for the public node name, the private node name and the virtual hostname for all nodes in the cluster. The name, node1, that you entered is being used by more than once for the same node."
    Has anyone experienced this error message before and know what the cause is?
    Could it be a problem with the /etc/hosts file?
    Thanks in advance,
    M

    Make sure you allocate separate IP addresses on your network for the VIP addresses on each RAC node (this is not the same as the machine IP already configured on the OS).
    Also, the installer may complain if your private and public IPs are configured under the same subnet.
    Finally, as mentioned before, check that name resolution for all the IPs to be used. On all RAC nodes, your /etc/hosts file should be configured with:
    - public name and IP addresses of ALL nodes
    - private name and IP addresses of ALL nodes
    - VIP name and IP addresses of ALL nodes
    Hope that helps
    B.

  • Print option of lanscape rather than portrait for apprisal document

    Hi SAP HCM Experts,
    if we take a print of appraisal document from ESS/MSS we get Portrait  form of print, but can we get it in landscape form print
    Whether  can have a print option of lanscape rather than portrait for apprisal document. if yes where we need to change in template.
    I appreciate your help.
    Thanks and regards
    Vijai

    Hi HCM experts,
    any answer
    I appreciate your help.
    Thanks and regards
    Vijai

  • [svn:fx-trunk] 5061: Changed the skin to use hostComponent rather than fxComponent so that binding happens on a strongly typed instance .

    Revision: 5061
    Author: [email protected]
    Date: 2009-02-24 14:18:51 -0800 (Tue, 24 Feb 2009)
    Log Message:
    Changed the skin to use hostComponent rather than fxComponent so that binding happens on a strongly typed instance. By doing this we save the overhead of calling describeType() and doing RTTI. Also updated the backgroundColor to be cast to uint until the getter/setter is updated to return that (currently it is object)
    QE: No
    Doc: No
    Checkintests: Pass
    Reviewer: Ryan F & Glenn
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxApplicationSkin.mxml

    Revision: 5061
    Author: [email protected]
    Date: 2009-02-24 14:18:51 -0800 (Tue, 24 Feb 2009)
    Log Message:
    Changed the skin to use hostComponent rather than fxComponent so that binding happens on a strongly typed instance. By doing this we save the overhead of calling describeType() and doing RTTI. Also updated the backgroundColor to be cast to uint until the getter/setter is updated to return that (currently it is object)
    QE: No
    Doc: No
    Checkintests: Pass
    Reviewer: Ryan F & Glenn
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxApplicationSkin.mxml

  • [svn:osmf:] 14927: Refactor sample to use MediaPlayer rather than traits.

    Revision: 14927
    Revision: 14927
    Author:   [email protected]
    Date:     2010-03-22 17:12:29 -0700 (Mon, 22 Mar 2010)
    Log Message:
    Refactor sample to use MediaPlayer rather than traits.  Fix typo in another example.
    Modified Paths:
        osmf/trunk/apps/samples/framework/DynamicStreamingSample/src/DynamicStreamingSample.mxml
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/traceproxy/TraceListene rProxyElement.as

  • Why should i use JSF rather than Struts?

    What makes JSF useful than Struts? In my project I am using like
    <h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
    In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
    From what i understand is Presentation Layer should be shielded from whatever is going on in the backend. So, this doesn't do good right?
    Please suggest.
    How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..

    srikanthradix wrote:
    What makes JSF useful than Struts? In my project I am using like
    <h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
    In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
    From what i understand is Presentation Layer should be shielded from whatever is going on in the backend.You can use "binding" and define everything in Java code if you want. You can rename your method to reflect what you want to see in the front end if you want. You can use JSFTemplating to use handlers which can be mapped to any name you want to see and do not have to match the method name of the java class (although I suspect this is the opposite direction from what you are suggesting you want).
    EL in jsf (i.e. #{bean.login}) is meant to do the mapping in JSF pages rather than externalize this in a separate file and force the page developer to edit multiple files for simple tasks. Although in some cases navigation is broken out into a separate file (i.e. faces-config.xml file using the default NavigationHandler navigation rules), this can also be done inline. It's a different way of doing development and has its pros and cons (easier, but mixes up presentation and controller somewhat). That said... JSF is very flexible, it CAN externalize any of this information, it just requires you to provide a different ViewHandler information that allows you to enter the data the way you like to see it (imo, you won't realize any benefit from the separation, though -- I used to think it was worth doing but have changed my opinion).
    So, this doesn't do good right?Perhaps in theory... but in practice, I don't think it really has a drawback. One caveat, I like how I implemented event handling in JSFTemplating as opposed to action/actionListener attributes which are not configurable and are more opaque than I prefer. My parameterized handlers allow for better code-reuse, but arguably mix up presentation and controller code even more (depending on how they're used).
    Please suggest.
    How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..The idea of a component helps tremendously as someone else can create a component for you and you can benefit from it. There are many great component sets available on the market (for free and for purchase). For example: Woodstock (which has drag/drop support inside NetBeans), RichFaces, IceFaces, Tomahawk, Scales, etc.
    Renderers allow you to cleanly separate the presentation of a component with the data of the component. You can then switch out the presentation to support multiple markups (i.e. client devices). In addition, JSF's rich lifecycle provide logical places for certain types of operations to occur, the renderers participate in this so that they are performing their tasks at a well defined time. And finally, many different components may re-use the same renderer, or a single component may use one of several renderers. The separation of data and display (model and view) makes this very clean.
    JSF is not Struts. If you expect it to be struts, you may be disappointed (or if you expect struts to be JSF, you'll be disappointed). JSF has a lot to offer (as does struts), you have to decide what is important to you and your organization. Some things to consider wrt to JSF: very strong vendor support; many large set of components to choose from; multiple standards-based tools to choose from; very flexible (most parts of the framework are pluggable); active growing development community; component-based model which encapsulates complexity for things like Ajax, pagination, and other things (often complicated in a non-component architecture); good integration with other frameworks.
    I don't know if this makes your decision any easier, but hopefully it helps clarify how you should be viewing JSF & Struts.
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • How do I change the examples to use Oracle rather than Cloudscape

    I set up the JDBC connector and can ping my Oracle DB from WebLogic. I know what
    to run the first EJB example using the Entity beans and persisting with the CMP.
    I built a table in Oracle - just don't know the process for talking to Oracle
    rather than to Cloudscape which seems to start automatically with the Examples
    server. I have the JDBC code, but where do I put it? What config files need to
    be modified?
    Thanks!

    rcolbroth wrote:
    Is there anyway of creatiing a different name for this Folder rather than 2013?
    If you are using one of Lightroom's "date-based" folder templates, then the folders are created in accordance with the image capture date, not the date that you happen to import it. If you specifically want to use the import date for your folder names then you probably don't want to use the Lightroom date template, and instead you'll need to setup your folder names manually.
    The vast majority of users that use date-based folder naming schemes will use a standard Lightroom template, i.e. based on the much more meaningful image capture date.

  • How can I get iTunes to use voucher rather than credit card when downloading to iPod touch?

    How can I set up an iPod touch so that it uses iTunes vouchers when downloading apps etc rather than charging to a credit card?

    Hello, Helen. 
    Thank you for visiting Apple Support Communities. 
    Here is the best resource on how iTunes Store purchase are billed. 
    iTunes Store: How iTunes Store purchases are billed
    http://support.apple.com/kb/HT5582
    Regards,
    Jason H. 

  • Why use JPDK rather than Pl/SQL PDK

    Hi All,
    currently I have deployed all my portlets using the Pl/SQL PDK which is very good, but slow to create portlets in that it takes time to create each portlet.
    what are the advans / disadvans to using the Java PDK to create portlets ?
    I perfer to wqork at the PDK level rather than the portal application level as I have found the PDK portlets much more portable / scalable when installoing on different servers.
    Any information on the JPDK would be very helpful.
    thanks Darragh

    Hello,
    Thanks for your answer, it's very helpful. I'm still looking for a strategy to link the VO and the EO though. I thought about registering the EO in the VO as normally, but not use it in the query (obviously) then override the ViewRow and do some funky stuff in the various 'set' methods to do something like:
    setAttributeInternal(index, value);
    // somehow push the value in the EOHowever, programatically pushing the value in the EO from the VO seems trivial so far, but I'm not sure how good the result will be. I'll test it to see how well it works, but if there's any documentation about that subject that you know of, it would be appreciated.
    Thanks,
    ~ Simon

  • Is it possible to pass array of strings as input parameters for stored proc

    Dear All,
    I wrote a Stored Procedure for my crystal report. now i got a modification.
    one of the parameters 'profit_center' should be modified so that it is capable to take multiple values.
    now when i run report crystal report collects more than one values for parameter profit_center and sends it as input parameter to stored procedure all at a time.
    the only way to handle this situation is the input parameter for stored procedure 'profit_center' should be able to take array of values and i have a filter gl.anal_to = '{?profit_center}'. this filter should also be modified to be good for array of values.
    Please Help.

    Or you can use sys.ODCIVarchar2List
    SQL> create or replace procedure print_name( In_Array sys.ODCIVarchar2List)
        is
        begin
                for c in ( select * from table(In_Array) )
                loop
                        dbms_output.put_line(c.column_value);
                end loop ;
        end ;
    Procedure created.
    SQL>
    SQL> exec print_name(sys.ODCIVarchar2List('ALLEN','RICHARD','KING')) ;
    ALLEN
    RICHARD
    KING
    PL/SQL procedure successfully completed.SS

  • Omiting parameters for stored procs

    Post Author: lihaze
    CA Forum: Data Connectivity and SQL
    Hi - I hope that this is a straightforward one..  I have a number of params in a shared stored proc (they do default to NULL, but the app that I am using to call Crystal firstly cannot pass in a NULL value(!!!), and also always asks for the same no. of params that are in the creport. So, I am using Crystal 8.5, I dont even want these params to be requested. How can I make sure that they arent requested in Crystal?thanks

    Post Author: yangster
    CA Forum: Data Connectivity and SQL
    to actually pass a null value using crystal reports you will have to use crystal 2008as this isn't what you are after the alternative would be to in your report edit the parameter from the stored procedureput in a value, set the default value to that value and change allow custom value to falsethis will push the default value to the parameter every single time the report is run so you will not be prompted for the parameter value anymore

  • Default large Excel file to client application rather than prompting for PowerBI

    I have a user working with OneDrive for Business to share a 13MB Excel file that contains PowerPivot data.  When a user clicks the shared link or the guest link they receive this message:
    We cannot determine a way to open this file in the Excel client.  Naturally we would like to default this file to open in the client rather than throw an error and a "free trial" option.
    Why is there no button for "open with client application?"

    Has anyone else experienced this?

  • Can I use thumbnails rather than the {sitename} to load different galleries?

    Hi all-
    I'm new to Spry and all things Javascripting but I'm attempting to construct a image gallery using Spry in Dreamweaver CS3. I've used the "Original Photo Gallery" from the Spry Demo folder as a jumping off point and everything works correctly.
    I would like to know if it is possible to use representative thumbnails rather than the select dropdown to launch the different galleries? I'm sure it is, but I'm a total neophyte and have no idea what to do. I'd like to set up a AP Div with 9 thumbnails in a table that would each launch a different gallery. How do I do that?
    Jimmy

    Hello, because you're SELECTing tournament.tourtype in the SELECT list, the answer is not really. If you didn't need t.tourtype in the SELECT list, you could have:
    select m.memberid, m.lastname, m.firstname
    from member m
    where exists (select 1
            from entry e inner join tournament t on (e.tourid=t.tourid)
            where m.memberid=e.memberid
                and upper(t.tourtype)='OPEN');And you know the t.tourtype is 'OPEN' anyway, so you don't need to SELECT it. So you could have this, and the answer is yes:
    select m.memberid, m.lastname, m.firstname, 'OPEN' tourtype
    from member m
    where exists (select 1
            from entry e inner join tournament t on (e.tourid=t.tourid)
            where m.memberid=e.memberid
                and upper(t.tourtype)='OPEN');Edited by: SeánMacGC on May 7, 2009 2:09 AM

Maybe you are looking for

  • Server does not send mails

    I have a problem with the mail server. He sends some mails not to other mail servers. I get back the message with the error: host mail.domain.de [...IP...] said: 554 5.7.1 <unknown [...IP...]>: Client host rejected: <-- please use SMTP-AUTH for mail

  • Points didn't add to my account for purchase at Pacific Sales

    Hi, I purchased washer and dryer at Pacific Sales and gave My Best Buy™ account to the sales asscociate for the purchase order on Feb 27th. But when I checked my rewards balance today, I didn't see that part of points added to my account.  I checked

  • Is latest version of safari supports Doccument Object Model?

    Hi All, I wish to know that the latest version of Safari browser supports DOM (Doccument Object Model)?. There is any VC++ sample code for doing the DOM in safari?. Please help. Thanks, R-VR

  • Using BT HomeHub as a print server

    I have an epson printer which I have been using for a couple of weeks with my new mac, and I also have to share it with my brother who uses XP. I connected the printer to the Hub (BT HomeHub v1.5) USB port and managed to make it print through windows

  • Flash ~ IE7 ~ Black Bkgrnd doesn't show!

    Hi Everybody, Hope some one can help: Recently, in IE7 and Firefox, I noticed my Flash SWF files which had black Bkgrnds [ya know, on the stage] didn't show as "black" but as a white or "no" color. Today, Firefox did an update to version 2.0.0.10 and