What is wrong in my store procedure

Hi all,
I confuse on in ,out inout in store procedure , I got eroor at
Formal parameter '@AccessionNumber' was defined as OUTPUT but the actual parameter not declared OUTPUT
I use sql server 2000 and ms type 4 driver,
my test store procedure is
drop  proc test_select
go     
create proc test_select
(@AccessionNumber int,
@NewNum varchar(20))
AS
        begin
    begin transaction
select FieldNumber, Name, HiTiter, SubType, Storage,SampleRegion, SampleYear
        from STData.dbo.ViruName00          
     where AccessionNumber=@AccessionNumber      
        and NewNum=@NewNum
if @@error <>0 or @@rowcount !=1
           begin
                rollback
               return
          end
       commit transaction
endand my test servlet is
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import javax.sql.*;
* TryJdbc.java
* This servlet demonstrates using JDBC
public class displayT1 extends HttpServlet {
    CallableStatement cs =null;
    ResultSet rs = null;
    Connection conn = null;
   * We want to initialized the JDBC connections here
    public void init()
        try{
        Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
        catch( Exception e )
            e.printStackTrace();
   * This responds to an HTTP GET request.
    public void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
        response.setContentType("text/html");
    PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head>");        
        try{
          conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433","test","1234");
        conn.setCatalog("STData");   
       //we made it!
        out.println("connection established sucessfully!");
           // register int OUT parameter
            cs = conn.prepareCall("{call test_select(?,?)}");
              cs.setInt(1, 1);
               cs.setString(2, "00-1");
cs.registerOutParameter(1, Types.INTEGER);
     cs.registerOutParameter(2, Types.VARCHAR);
                 ResultSet rs = cs.executeQuery(); 
      out.println("<html>");
                     out.println("<body bgcolor=\"#d2eeff\">");                  
                     out.print("<table border=\"1\"  width=\"37%\"> "); //create an html table
                     out.print("<tr>");
                     out.print("<h2> Customers on the flight</h2>");
                     out.print("</tr>");                    
                     out.println("<tr><td>Name</td>");
                     out.println("<td>SubTYpe</td></tr>");
                       while(rs.next()) {
                         out.print("<tr>");
                          out.print("<td>"+ rs.getInt(1) +"</td>");
                           out.print("<td>"+ rs.getString(2) +"</td>");
                           out.print("</tr>");                             
                            }// end while
                  out.print("</table>");
                   out.print("</body></html>");
                   out.close();
      while(rs.next()) {
       String Name=rs.getString("Name");        
        out.print(""+Name+"");
         out.print("</body></html>");
          out.close();
     }catch(SQLException e) {
            e.printStackTrace(out);
     finally {
      try {
        if(rs != null)
          rs.close();
          rs = null;
        if(cs != null)
          cs.close();
          cs = null;
        if(conn != null)
          conn.close();
          conn = null;
    catch (SQLException e) {}   
public void doPost(HttpServletRequest Request, HttpServletResponse Response)
                throws ServletException, IOException {
public String getServletInfo()
    return "A Simple Servlet";
}and my AccessionNumber is first column, and NewNum is second column.
appreciate any help!
Thank you!

HI all,
html + bean + jsp call store procedure still not work, I got empty output!!
what is wrong ?
public  String getString(){
    return string;
public void setString( String string ) {
   this.string =string;    }
public  String getMyType(){
    return myType;
public void setMyType( String myType ) {
   this.myType =myType;    }
try {
              cs = db.prepareCall("{call select_all(?,?)}");            
               cs.setString(1, myType);
               cs.setString(2, string); 
                 ResultSet rs = cs.executeQuery();         
        fieldNumberList.clear();
        nameList.clear();
        hiTiterList.clear();
        subTypeList.clear();
        storageList.clear();
        sampleRegionList.clear();      
        rowCount = 0;
        while (rs.next()) {
           fieldNumberList.add(rs.getString("FieldNumber"));
           nameList.add(rs.getString("Name"));
           hiTiterList.add(rs.getString("HiTiter"));   
           subTypeList.add(rs.getString("SubType"));
           storageList.add(rs.getString("Storage"));
           sampleRegionList.add(rs.getString("SampleRegion"));
           rowCount++;
          anyRecords = true;
        }//end while
      }//end trythe following code work in servlet
cs = conn.prepareCall("{call select_all(?,?)}");
               cs.setString(1, myType);
               cs.setString(2, string); 
                 ResultSet rs = cs.executeQuery(); 
         thank you!

Similar Messages

  • What's wrong with my store procedure?

    HI, I can't figure out what's wrong with my stored procedure. I believe i have a "commit;" where it's not supposed to be. What i really want to acheive is save the record once it finds those keywords. Maybe my syntax is all wrong.
    I am getting the following error msg. PLS-00103
    create or replace
    procedure sp_diag is
    DECLARE
    v_setting_key NUMBER(18);
    v_parent NUMBER(22);
    v_name VARCHAR2(100);
    v_class_key NUMBER(22);
    CURSOR c1 IS
    select setting_key, setting_class_key,name
    from cms2wire.setting_list;
    CURSOR c2 IS
    select setting_class_key, parent_class_key,name
    from cms2wire.setting_class
    where setting_class_key = v_parent;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 into v_setting_key, v_parent, v_name;
    EXIT when c1%NOTFOUND;
    WHILE v_parent != null
    LOOP
    OPEN c2;
    FETCH c2 into v_class_key, v_parent, v_name;
    CLOSE c2;
    IF v_name='Diag.'or v_name='Settings.' THEN
    COMMIT;
    END IF;
    END LOOP;
    END LOOP;
    CLOSE c1;
    END;
    -------------------------------------------------------------------------------------

    Now, the way I see it, if you want to save the information, then you need to put it some place, so your slow-by-slow stored procedure becomes something like
    INSERT INTO some_table (column list)
      SELECT a.setting_key,
             a.setting_class_key,
             a.name
             b.setting_class_key,
             b.parent_class_key,
             b.name
        FROM cms2wire.setting_list  a,
             cms2wire.setting_class b
       WHERE a.setting_class_key = a.setting_class_key
         AND b.name in ('Diag.', 'Settings.');
    COMMIT;does it not?

  • What is wrong with App Store?  On all of my devices it says App Store is unavailable

    What is wrong with App Store?  On all of my devices it says App Store is unavailable

    Based on posting time
    It could be off line for maintenance - picking slowest time of day.
    It could be off line because of a power failure - even with UPS(uninterrupted power source) they may want to shut down.
    Extreme melting can flood man-holes causing line failures.

  • What's wrong with my approval procedure query ?

    Hi everybody,
    This is my query :
    SELECT DISTINCT 'TRUE' FROM RDR1 WHERE $[$38.U_Prix_plancher.number] >=$[$38.Price.number]
    What's wrong with that ?
    Thanks
    Ara

    Ara,
    The problem is not with your Query but the problem is with the way the Query gets trigerred for an Approval Process.
    SAP only recognizes the value of a $[$38.x.x] parameter when that particular row is active.
    I suggest you can test this by simply highlight that particular row which breaks the rule and try to Add the document and you will see that the Approval Procudure will fire.
    Also remember an Approval Procudure works only when you are in Add Mode and does not on Update.
    Regards
    Suda

  • What is wrong with app store iOS 6?

    What is wrong with iOS 6 on my iPod. Apps are loading and search results are empty.

    Based on posting time
    It could be off line for maintenance - picking slowest time of day.
    It could be off line because of a power failure - even with UPS(uninterrupted power source) they may want to shut down.
    Extreme melting can flood man-holes causing line failures.

  • What's wrong with Virtual Store for Journ.E

    What is with the virtual store?
    I have a wihte screen, i never see virtual store ?
    I think the support is very very bad.
    Nobody becomes an answer about the question !

    I think we need to join together and sue Toshiba for this behavior and to prompt further selling their products in the EU. My unit is still under warranty and I have consulted with some associations of consumers who are willing to come out with this example to the public, and who they recommend with Indemnifying lawsuit demanded that they, too, would support all lawful means and confident as well as some prominent lawyers in positive outcome for us, the consumers in this case ..

  • I keep getting redirected to this website whenever I enter in my payment info. I've tried different payment methods, nothing seems to work. I don't know what to do at this point. Anyone know what is wrong?

    I keep getting redirected to this website whenever I enter in my payment info. I've tried different payment methods, nothing seems to work. I don't know what to do at this point. Anyone know what is wrong?

    iTunes Store: Changing your payment information
    http://support.apple.com/kb/ht1918
    iTunes Store Accepted Forms of Payment
    http://support.apple.com/kb/HT5552
     Cheers, Tom

  • What is wrong with itunes. it says itunes store is not available. try back later.

    itunes store is not available. try back later. Everytime I try to purchase something this message appears. What is wrong with itunes?

    iTunes in Windows is difficult to uninstall.
    I found this for you in an older thread (read carefully before you start):
    Quote
    Resolution
    Note that the following procedure involves a registry edit. Back up your registry prior to proceeding.
    (1) Do a complete uninstall of iTunes and related software components as per the instructions in the following document (but do not attempt to reinstall iTunes just yet):
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7:
    http://support.apple.com/kb/HT1923
    (2) Launch Regedit as an administrator. In your Start Search field, type regedit. Right-click on the Regedit entry that comes up and select "Run as administrator" as per the following screenshot:
    (3) In the left-hand pane of Regedit, click the triangle next to HKEY_LOCAL_MACHINE to expand its contents.
    (4) Expand the contents of SOFTWARE
    (5) Expand the contents of Microsoft
    (6) Expand the contents of Windows
    (7) Expand the contents of CurrentVersion
    (8) Expand the contents of Installer
    (9) Expand the contents of UserData
    (10) Expand the contents of S-1-5-18
    (11) Right-click on Components and select "Permissions" as per the following screenshot:
    (12) In the "Permissions for Components" screen that comes up, click the Advanced button:
    (13) In the "Advanced Security Settings for Components" screen that comes up, click the "Owner" tab.
    (14) In the "Owner" tab, check the "Replace owner on subcontainers and objects tickbox, select "Administrators" and click Apply:
    (14a) If (after clicking Apply) you receive a "Registry Editor could not set owner on the key currently selected, or some of its subkeys" message, click OK:
    (15) Click OK in the "Advanced Security Settings for Components" screen.
    (16) Click OK in the "Permissions for Components" screen.
    (17) Quit out of Regedit.
    (18) Try installing iTunes using the latest version of the iTunes installer downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • My 10.8.3 update did not install properly citing an 'Unknown Error'. Now, my Mail and Mac App Store aren't working. What went wrong and how do i fix it ?

    My 10.8.3 update did not install properly citing an 'Unknown Error'. Now, my Mail and Mac App Store aren't working. What went wrong and how do i fix it ?

    I tried this and still have the same problems. If I open Address book or the Mac App Store I get the library rebuild popup and a hang. I created a fresh user and then things are better apart from the printing issue. Its clearly some 3rd party software issue but the crash logs are meningless to me. I used the excellent Etre check app from http://www.etresoft.com/etrecheck so I have a list of what is being loaded and can compare clean and crashed user info but as I cant work out which of the startup items, launch agents, launch daemons etc that  are causing the problem.
    I have eliminated Dropbox, Mac Keeper and Witness, and it isnt related to my exterrnal LED cinema dispay or my external thunderbolt drives, or any USB devices if thats any help to anyone else. Info from Etrecheck follows -
    Kernel Extensions:
              com.oxsemi.driver.OxsemiDeviceType00          Version: 1.28.7
              com.rogueamoeba.InstantOn          Version: 6.0.2
              com.rogueamoeba.InstantOnCore          Version: 6.0.2
              com.Cycling74.driver.Soundflower          Version: 1.5.3
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
                 [not loaded] com.adobe.fpsaud.plist
                 [not loaded] com.adobe.SwitchBoard.plist
                 [not loaded] com.bombich.ccc.plist
                 [not loaded] com.dymo.pnpd.plist
                 [not loaded] com.intego.BackupManagerPro.daemon.plist
                 [not loaded] com.micromat.TechToolProDaemon.plist
                 [not loaded] com.microsoft.office.licensing.helper.plist
                 [not loaded] com.orbicule.witnessd.plist
                 [not loaded] com.sierrawireless.SwitchTool.plist
                 [not loaded] com.stclairsoft.AppTamerAgent.plist
                 [not loaded] org.macosforge.xquartz.privileged_startx.plist
                 [not loaded]          pcloudd.plist
    Launch Agents:
                     [loaded] com.divx.dms.agent.plist
                     [loaded] com.divx.update.agent.plist
                     [loaded] com.epson.epw.agent.plist
                     [loaded] com.lacie.raidmonitor.daemon.plist
                     [loaded] com.lacie.safemanager.daemon.plist
                     [loaded] com.micromat.TechToolProAgent.plist
                     [loaded] com.orbicule.WitnessUserAgent.plist
                     [loaded] org.macosforge.xquartz.startx.plist
    User Launch Agents:
                 [not loaded]          .DS_Store
                     [loaded] com.adobe.AAM.Updater-1.0.plist
                     [loaded] com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae.plist
                     [loaded] com.digitalrebellion.SoftwareUpdateAutoCheck.plist
                     [loaded] com.divx.agent.postinstall.plist
                     [loaded] com.google.keystone.agent.plist
                     [loaded] com.propaganda.dejavu.dvmonitor.plist
                     [loaded] com.valvesoftware.steamclean.plist
                     [loaded] com.zeobit.MacKeeper.Helper.plist
    User Login Items:
              iTunesHelper
              Synergy
              TomTomHOMERunner
              Dropbox
    3rd Party Preference Panes:
              Déjà Vu
              Flash Player
              Flip4Mac WMV
              GR-55
              Paragon NTFS for Mac ® OS X
              Perian
              Printopia
              TechTool Protection
              Witness

  • Why can't I open iTune Store on my PC?   When I click on the iTunes Store box, I get the message that the iTunes Store has stopped working.  This happens everytime.  What is wrong with my download?

    My PC is running Windows 7.  I have downloaded the new OS Version for iTunes onto the computer.  It all works fine from the iPod Touch, but when I click the block for the iTunes Store, I get the message that "iTunes has stopped working".  What is wrong? How can I fix it so I can purchase from the store on my PC instead of having to use the small keyboard on the iPod Touch?

    There's an issue currently that a lot of us are experiencing in that we all get the error message "iTunes is currently unavailable; please try later"
    It's an issue with Apple and we're awaiting an update re this
    I've posted a topic in regards to this after having a long conversation with Apple support this morning and will be receiving a call from their tech team tomorrow to run through it further
    As it stands iTunes cannot be accessed via ATV's and nor can it be streamed via AirPlay from iTunes to the ATV
    However I can access all films/iCloud content via my Mac Mini with no issues!

  • At the moment I can use my apple Id on my iPod touch to connect to iCloud and IMessage and FaceTime but it doesn't work on App Store. Face to an error: can not connect to iTunes Store. What's wrong? My apple Id is working on my MacBook Pro as well.

    At the moment I can use my apple Id on my iPod touch to connect to iCloud and IMessage and FaceTime but it doesn't work on App Store &amp; iTunes just on iPod  Face to an error: can not connect to iTunes Store. (Setting... itunes &amp; app store)What's wrong? My apple Id is working on my MacBook Pro as well. And it was working on this iPod before resetting . Just after resetting I can not connect to App Store &amp; iTunes and I can not instal any app even free apps

    Try
    Can't connect to the iTunes Store

  • What is wrong with my shipping address? I want to order pictures via apple store with iPhoto. Apple Id and payment seem ok. My current and correct shipping address appears with red letters. Why and what to do?

    What is wrong with my shipping address? I want to order pictures via apple store with iPhoto. Apple Id and payment seem ok. My current and correct shipping address appears with red letters. Why and what to do?
    Maybe this is relevant: I bought iphoto from the German apple store but I now live in Italy. I have tried German credit card with German invoicing address and Italian shipping address. And I have tried Italian credit card with Italian invoicing address and Italian shipping address. The phenomenon is the same: shipping address appears in red and I am asked to fill in the mandatory fields (which turn red whatever I enter).

    KarinavD,
    what is the setting for the Print Products Store in the Advanced Tab of the iPhoto Preferences?
    The country you select there has to match the billing address. And your billing address should match the country of your AppleID and credit card used with the AppleID.
    Regards
    Léonie

  • What is wrong with my app store?

    What is wrong with my app store? I am trying to update my apps and purchase a new one but it is not working on my iPad. It is working on my iPhone 4 though.
    I have tried turning my iPad off then on, I have tried re booting it by holding the 2 buttons at once, don't know what else to do. I have even gone in through the general settings and logged out of my apple ID then logged back in. This is annoying. I just want to buy an app!!!

    The App store appears to be having issues right now.
    Stedman

  • HT3204 I got a reading of "secure link to iTunes store failed" when I ran a diagnostic "network connectivity" test. What's wrong and how do I fix it? I am indeed unable to connect to the store.

    Can anyone help me figure out what's wrong when I try to connect to the iTunes store? I got a message "secure link to iTunes store failed" when I ran a diagnostic "network connectivity" text. What's wrong?
    Thanks for any help you can give me!

    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • What's wrong with the itunes store UAE? i couldnt buy my favorite songs and movies because there's no "music" and "movies" category. please do something... thanks!

    what's wrong with the itunes store UAE? i couldnt buy my favorite songs and movies because there's no "music" and "movies" category. please do something... thanks!

    You are not addressing Apple here...
    This is a User to User forum...
    iTunes Store: Which types of items can I buy in my country?

Maybe you are looking for

  • Has anyone had issues with texting between your iPhone and your iPad 2?

    If I send a text message from my iPad 2 and my iPhone 4 to someone it sometimes creates two different text feeds in my friend's phone.  So it shows two different text "groups" in their iPhone.  If they reply on one of them I don't get the messages. 

  • ODI Procedure to File Mapping

    HI, My scenario is like this i have a package/function in db which returns a custom type. Now i want to transform this custom type into a flat file. Here is my procedure : Declare v_return_value XXTLN_EMP_ASSG_DATA_TAB := XXTLN_EMP_ASSG_DATA_TAB ();

  • Referencing Tables - "Invalid Reference"

    I'm trying to reference a cell between two tables on a single sheet. While this works with several tables, it doesn't work with one of them--even when I click on the cell I want to reference. It will, however, work if I duplicate the table, delete th

  • Home button need more pression

    Hi, I got this probem, Since yesterday I had to use more pression to the home button to exit from iphone apps, and sometime doesn't work momently. Any ideas?

  • How can I change the name of a blackberry messenger contact that shows on my screen?

    Need help!! I've got a blackberry 8310 model and I don't know how to change the contact name for my messenger contacts to a nickname or ANYTHING or than the 'friendly names' that messenger seems to magically assign them....... Solved! Go to Solution.