How can i call a procedure from the app

hi
i have an establish connection to a database (MS SQL SERVER 2000) , i can get data from the tabels by sql statments.
i have stored procedure in the database , how dan i run procedure with parameters from the app.
lets say i have one procedure that takes one parameter "city_name"
procedure delete_city ( @city_name char(100) )
how can i run it
thanks ahead
johny

Hi,
Assuming con is the connection object:
Assuming city_name is the name of the city to be passed to the stored proceduer
Step 1: Create a callable statement object e.g. CallableStatement cs = con.preparecall("{delete_city(?)}");
Step 2: Set the IN paramter of the stored procedure e.g. cs.setString(1, city_name);
Step 3: Execute the callable statement e.g. ResultSet rs = cStat.executeQuery(); //assuming only one resultset is returned by your stored procedure
Step 4: Process the resultset as you do for getting data from your other sql statements.
This is a very basic way to execute a stored procedure. The complexity lies in executing stored procedures :
1) which return a value
2) which will result in multiple result sets
3) having IN, OUT and INOUT parameters
4) a combination of any or all of the above
I would suggest you look up the JDBC API to get more details.
Regards,
bazooka

Similar Messages

  • How can I get a refund from the app store?

    Hi,
    I bought an game from the app store for 4.99. The description was written to be completely misleading and misrepresentative of the product (BADASS DUCATI: Street Monster).
    I notice the same developer has a number of apps. on the store following the same format. Also there are more under a different developer name.
    I emailed apple for a refund. No response (disappointing). I emailed the developer. No response (no surprise). Surely apple must have some responsibility to ensure that apps are correctly represented in their store and, by taking a commission on the transaction, should take some ownership of the contract of sale?
    Any suggestions how to get a refund? how to report these bogus apps so that apple can clean the shelves of rogue developers?
    Regardless of the success of a refund,  to see the apps get pulled and the developer banned would at least demonstrate that apple care about their consumers and are not supporting the app store as a platform for conmen.

    There are no refunds.  Sorry.
    You can leave feedback for Apple at:
    http://www.apple.com/feedback

  • How can I re download adds from the app store

    In previos versions I was able to do the option trick. What shoud l do now as I need to resinstall a program that I had to delete?
    What is the prcoesss for maverics? lion and mt lion instead of the option trick?

    I just tried it again in admin mode and it worked.  It must have soemthing to do with being in reguylar user mode?  ALso how can I move apps tire aps from 1 account to another. This is needed if someone quits and another person took there job  mainly used for domain style apps that go on all macs.

  • How can I c my note from the app that came with the phone

    I broke my phone n have thongs saved in the app notes that come on the phone how I can c them

    The MOD files are actually mpeg2 files and should be able to be converted using mpegstreamclip, although you may have to manually change the file extension to mpg.
    mpegstreamclip can be d/l at http://www.squared5.com
    you can get the qt mpeg2 component at http://www.apple.com/quicktime/mpeg2
    Alternatively you could try Karsten's method of importing mpeg2 into imovie.
    http://karsten.schluter.googlepages.com/im08tricks

  • How can I download Mnt Lion from the App Store on a new Mac running Mavericks?

    Greetings... We just purchased a new iMAC at work and need to remove Mavericks and move it backwards to Mnt Lion.
    Some of our big apps like Esko Automation Engine Pilot arn't ready for Mavericks yet so we need to go back a version
    to obtain the compatibility.
    When I access the Mnt Lion download via the App Store I get an error message (1004) stating that Mnt Lion can not
    be installed on this machine?
    Any ideas on how I can make this happen?
    Thanks

    http://support.apple.com/kb/ht2186

  • How can i call a method from the a subdirectory using packages

    This is my directory structure:
    java
    --p1
    --One.java
    --p2
    --Two.java
    package java.p1;
    import p2.Two;
    public class One
         public static void main(String args[])
              Two obj = new Two();
              obj.p();
    package java.p2;
    public class Two
         public void p()
              System.out.println("p method");
    ERRORS !!
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:3: package p2 does not exist
    import p2.Two;
              ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
                    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
                                  ^Help me out. Thanks.

    jinchuriki123 wrote:
    This is my directory structure:
    java
    --p1
    --One.java
    --p2
    --Two.java
    package java.p1;
    import p2.Two;
    public class One
         public static void main(String args[])
              Two obj = new Two();
              obj.p();
    package java.p2;
    public class Two
         public void p()
              System.out.println("p method");
    ERRORS !!
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:3: package p2 does not exist
    import p2.Two;
    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
    ^Help me out. Thanks.You don't have a class p2.Two, You do have a class java.p2.Two. Package paths aren't relative.
    Also, it's recommended not to use package names containing "java" or "javax" (or is it illegal to do so?). Change your package & folder names.
    db

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • How can I get an invoice from the Apple store note that the original invoice may be burned with the house though Bamkmkm Send to Olga miles is my new (email address removed)and Thanks

    how can i get an invocce from the Apple store UK ?
    Message was edited by: Host

    Find the Apple Customer Support phone number for whichever country you're in and call them for assistance.

  • How can I call a RFC from dynpage ?

    Hi!
    I would like to know how can I call a RFC from a Portal aplication, dynpage or jspdynpage. there include some libraries ?
    any idea?
    thanks

    for deploying SAP Jra :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4#search=%22how%20to%20use%20jca%20sapjra%20site%3Asap.com%22
    For lookup of SAP Jra use:
    com.sapportals.connector.connection.IConnectionFactory connectionFactory =(IConnectionFactory) initctx.lookup( "deployedAdapters/SAPFactory/shareable/SAPFactory");
    Using SAP Jra
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/13044258bdd417e10000000a1550b0/content.htm
    The important jars required are:
    connector.jar
    Genericconnector.jar
    prtjndisupport.jar
    Thanks

  • How can i call a zreport from my bsp page.

    Hi friends,
    How can i call a zreport from my bsp page.
    Moosa

    Hi Friend,
    These are the codings  to be wirtten in BSP for transferring values to the REPORT
    DATA:wf_date TYPE ztable-ID.
          data:seltab type standard table of rsparams,
           wa_seltab like line of seltab,
         event TYPE REF TO if_htmlb_data.
    DATA:p_value TYPE REF TO CL_HTMLB_INPUTFIELD.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    p_requ ?= CL_HTMLB_MANAGER=>GET_DATA(
                                            request  = runtime->server->request
                                            name     = 'inputField'
                                            id       = 'i1'
    if p_requ is not initial.
      wf_date = p_requ->value.
    endif.
    clear wa_seltab.
    if wf_date is not initial.
      wa_seltab-selname = 'P_REQU'.
      wa_seltab-kind = 'P'.
      wa_seltab-option = 'EQ'.
      wa_seltab-low = wf_date.
      append wa_seltab to seltab.
    endif.
    submit *ZSAMPLEAP1* with selection-table seltab AND RETURN  .(ZSAMPLEAP1 refers to the report name and AND RETURN for coming back to the BSP page after the completion of its operation in Report )
    IMPORT int_name TO int_name FROM MEMORY ID '*zid*'.(For importing the obtained value from Report)
    In Report
    REPORT  ZSAMPLEAP1.
    SELECT-OPTIONS: p_requ FOR ztable-id  NO INTERVALS.
    SELECT SINGLE name from ztable into int_name WHERE id = p_requ-low.
    WRITE:int_name.
        EXPORT int_name TO MEMORY  ID 'zsharmila'.
    With Regards,
    SHARMILA BRINDHA.M

  • How can we call a report from a form.

    how can we call a report from an existing form.

    Have you searched the Forms help system? It shows you how to use RUN_REPORT_OBJECT

  • How Can I call Crystal report from R3?

    Hi experts,
      How Can I call Crystal report from R3?

    Hi Bill,
    Can you please be specific and could you please provide the steps
    Thank you

  • How can i call ajax and extract the data?

    Hi all,
    I don't know briefly about ajax..i want to learn ajax, so my question is how can i call ajax and extract the data. for ex, i have JSON file
        "mobile": [
                "Name": "Micromax",
                "Model": A310
                "Name": "samsung",
                "Model": grand 2
    for above example how can i call ajax..please anyone explain with small example because it'll help me a lot.
    Thanks & Regards,
    Palsaran

    Hi Palsaran,
    As i understood, your requirement is to POST data from UI to backend.
    The above code you given is not correct if you want to use model based implementation.
    In UI5 you don't need to do an explicit Ajax call, for which we can use Models like OData, JSON etc.
    For your JSON example, you can use like,
    var oModel = new sap.ui.model.json.JSONModel();
    var oData = "YOUR JSON DATA";
    oModel.setData(oData)
    oModel.loadData(yourURL/Entityset,"POST");
    For ref, you can use the below link
    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.json.JSONModel
    Thanks
    Naveenraj

  • How can I get all photos from the camera roll onto the photo stream so they will share between iphone and ipad?

    How can I get all photos from the camera roll, and all new pictures taken, to get on the photostream so they can share between iphone and ipad?

    When turning PhotoStream on with photos available in the Camera Roll, only photos captured by the iPhone or saved on the iPhone are placed in the PhotoStream.
    For all photos that were in the Camera Roll prior to turning PhotoStream on, import the photos with your computer and add the photos to your PhotoStream on your computer.

  • How can I make different catalogs from the same image

    How can I make different catalogs from the same image where that image has been changed in some way between the catalogs. For instance if I wanted to have a catalogs for cropped images and have 3 catalogs one for 4x6 , 5x7 and 8x10 cropping. When I tried this , if I changed a file in one catalog that same image in the other would change also.

    Do not confuse the creation of the crops and the display in collections per crop ratio.
    Of course one virtual copy (VC) per crop ratio is needed. If the same image should be cropped in all 3 mentioned ratios there would be 3 VCs.
    The OP asked how to have/see a set of same-crop-ratios.
    After having created the virtual copies for whatever crop ratio he wants, the way to display this result in the fashion asked for is via smart collections, provided they can be found. Without a plugin the naming of the VC with the crop ratio applied is a straight way to achieve that.
    IF the wish is to get new crops automatically added. (See my answers 2+3)
    IF the wish is to creat static collections per crop ratio for a certain set of images, I'd go as follows:
    1. Select all images you want to have cropped in that way,.
    2. With this selection click on the + to add another collection and fill the dialog box like this:
    Then navigate into this newly created selection and perform the 4x6 crop - according to taste individually or by synchronizing the first crop.
    Cornelia

Maybe you are looking for

  • How to extend the network when the main base station is a netgear WPN824 ?

    We have had a LAN since 98 with the first graphite AirPorts. Last years, we changed to 2 AirPort Express to include a printer and to extend the range. Now when we moved, needed further extention and have enhanced number of devices to connect to the L

  • PDF file gets corrupted when generated from BSP

    Hi,      I am generating a PDF file from a BSP page ( see the code below). The problem is that PDF file gets corrupted and  I am unable to open it. I also tried to use other functions like GUI_Download and DOwnload as suggested by many and they also

  • Need BootCamp Drivers for Windows Vista!

    Hi Guys, I lost my bootcamp installation disk for the Windows Drivers. I have OSX 10.6.3 and boot camp 3.0.2 on an imac G5 Intel duo. Please help me, I need drivers for Windows Vista . Thanks

  • Problems generating right CSR for Callmanager 10 - cisco messes up values, Bug?

    Hi, we wanted to install our official SSL certificates for the Callmanager, presence and Unity Connection. I had to regenerate the web-security from the console following the instructions. All values are in the correct order: orgunit orgname locality

  • List of services activated

    Hello Expert, Do someone know if a report exist to list all my services activated in SICF, i need to compare all the services activated in my environment. Thanks for your answers Williams