Need help for a school project

I am new to Oracle/Sql and the last part of my project requires that I use a Stored Procedure to access info from an AUTHORS table. I have followed the guidelines in the assignment but for some reason the Stored procedure is not working. If someone could help I would REALLY appreciate it. Thanks.
public void fillSet(string key)
if (connect())
cmd.CommandText = "SELECT TO_CHAR(SALES.ORD_DATE), SALES.QTY, SALES.TITLE_ID, TITLES.TITLE, TITLES. PRICE FROM SALES, TITLES WHERE SALES.TITLE_ID = TITLES.TITLE_ID AND SALES.STOR_ID = :key";
parm = new OracleParameter("key", key);
cmd.Parameters.Add(parm);
reader = cmd.ExecuteReader();
while (reader.Read())
ORDER_DATE = (string)reader.GetString(0);
QUANTITY = (int)reader.GetDecimal(1);
TITLE_ID = (string)reader.GetString(2);
TITLE = (string)reader.GetString(3);
PRICE = (double)reader.GetDouble(4);
TOTAL = QUANTITY * PRICE;
AUTHORS = loadStoredProcedure(TITLE_ID);
loadDataSet();
reader.Dispose();
cmd.Dispose();
oracleConn.Close();
return;
else return;
public string loadStoredProcedure(string match)
string cmdStr2 = "ALLAUTHORSFORTITLE";
op1 = new OracleParameter();
op1.Direction = ParameterDirection.Input;
op1.Value = (object)match;
op2 = new OracleParameter();
op2.Direction = ParameterDirection.Output;
op2.Size = 100;
cmd2 = new OracleCommand();
cmd2.CommandText = cmdStr2;
cmd2.Parameters.Add(op1);
cmd2.Parameters.Add(op2);
cmd2.CommandType = CommandType.StoredProcedure;
int code = cmd2.ExecuteNonQuery();  //error here
String buildit = (string)op2.Value;
oracleConn.Close();
return buildit;
}

Hi,
In cases with the same problems do you have, it's recommended to post a break point before the call of the store procedure. And then test the store procedure with this values separately. If you do this you can find out where the problem is.
Also, is best if you put the output of the console log to see what it's the problem.
Regards,

Similar Messages

  • I need help for a school project please help MEEEEEEEDX

    ok ladies and gents help me out i need some info on oracle solaris 11 and i havent been able to find it online. here is the stuff i need:
    1. Number of Clients Supported-
    2. Number of Processors Supported-
    3. Support for SMTP, HTTP, DNS, File & Print and Remote Administration-
    4. Support for Windows, Linux, UNIX & Appleclients-
    5. Back up capabilities-
    if you know anything about this stuff please help me out i would greatly appreciate it. and have a great turkey day everybody.XD

    No one will do your work for you, particularly if it is schoolwork.
    You would be cheating and whatever grade you might get would be false because it wouldn't be your work.
    Here is the link to Oracle's documentation page.
    From there you can get to the documentation for Solaris 11.
    http://www.oracle.com/technetwork/documentation/solaris-11-192991.html
    There is a lot of OS documentation there, so you had better start reading.
      It will take some time for you to eventually undertand it all.

  • Need help on java school project :-/

    Hi guys. I am currently taking a java class and am having particular trouble with a project that is due today. It is pretty simple but I am very new to java and keep getting errors when compliling that I do not know how to correct. Also, I am unsure as how I can incorporate the charAt() into the code (I am not even sure exactly what it is supposed to do; not very clear in the book)The background of my project is here:
    http://www.cuyamaca.net/celder/CIS%20182/project/project_ii.htm
    I hope someone can point out my mistakes and how to correct them if at all possible. Thanks a bunch. My code thus far is as follows:
    //Project II
    //Brian Schaefer
    //CIS 182
    //9-25-01
    import javax.swing.*;
    public class Project2 {
    public static void main ( String args[] )
    String firstName, lastName; // first and last name of user
    char emptype; // type of Employee (i.e. Student, Hourly, or Salaried)
    double hours, // hours person worked
    earned, // how much was made before taxes
    aftertax, // how much was made after taxes
    overtime, // extra work, counted as 1.5x normal pay per hour
    hourRate, // how much money per hour persons make
    yearlySalary; // salaried worker's yearly pay
    // Users enter their type of work
    emptype = JOptionPane.showInputDialog ( " Enter Employee Type: H for hourly, T for Temporary Student, or S for Salaried ");
    // User's first and last name are inputed
    firstName = JOptionPane.showInputDialog( "Enter your first name" );
    lastName = JOptionPane.showInputDialog( "Enter your last name" );
    // if employment type is salaried, then the following commands are carried out
    if ( emptype == S)
    yearlySalary = JOptionPane.showInputDialog ( "Enter your yearly salary" ); // user enters their yearly pay
    yearlySalary = (yearlySalary/52); // salary per week is calculated
    aftertax = earned * .82; // money per week after tax (18%)
    JOptionPane.showMessageDialog( "The gross weekly pay for " + firstName+ " " + lastName + " is" + earned +
    "\n" + "The weekly pay after taxes is " + aftertax); // outputs gross pay, persons name, and their pay after taxes
    // if employment type is hourly, then the following commands are carried out
    if (emptype == H)
    hours = JOptionPane.showInputDialog( " Enter hours worked this week " ); // user enters hours worked this week
    hourRate = JOptionPane.showInputDialog( " Enter hourly rate " ); // user enters their wage per hour
    // takes into account overtime
    if ( hours > 35)
    overtime = hours - 35; // hours over is subtracted from the standard week of 35 hours and stored
    earned = (overtime * hourRate * 1.5) + earned; // number is recalled, then multiplied by rate, then by 1.5
    //due to overtime paying out 50% more per hour and is then added to the non-overtime pay
    aftertax = earned * .82; // takes into account tax of 18%
    JOptionPane.showMessageDialog( "The gross weekly pay for " + firstName+ " " + lastName + " is" + earned +
    "\n" + "The weekly pay after taxes is " + aftertax); // outputs user name, gross pay, and pay after taxes
    else // if user does not work overtime then we go on the standard pay scheme
    earned = hours * hourRate; // hours worked multiplies by hourly wage to get the gross earning
    aftertax = earned * .18; // tax is taken into effect
    JOptionPane.showMessageDialog( "The gross weekly pay for " + firstName+ " " + lastName + " is" + earned +
    "\n" + "The weekly pay after taxes is " + aftertax); // outputs user name, gross pay, and pay after taxes
    else
    if (emptype == T)
    hours = JOptionPane.showInputDialog( " Enter hours worked this week " ); // user enters hours worked this week
    hourRate = JOptionPane.showInputDialog( " Enter hourly rate " ); // user enters their wage per hour
    // takes into account overtime
    if ( hours > 35)
    overtime = hours - 35; // hours over is subtracted from the standard week of 35 hours and stored
    earned = (overtime * hourRate * 1.5) + earned; // number is recalled, then multiplied by rate, then by 1.5
    //due to overtime paying out 50% more per hour and is then added to the non-overtime pay
    JOptionPane.showMessageDialog( "The gross weekly pay for " + firstName+ " " + lastName + " is" + earned +
    "\n" + "NO TAXES DEDUCTED" ); // outputs user name and their gross pay; no money taken for taxes
    else // if user does not work overtime then we go on the standard pay scheme
    earned = hours * hourRate; // hours worked multiplies by hourly wage to get the gross earning
    JOptionPane.showMessageDialog( "The gross weekly pay for " + firstName+ " " + lastName + " is" + earned +
    "\n" + "NO TAXES DEDUCTED" ); // outputs user name, gross pay, and pay after taxes
    // if user does not enter a valid employee type, they are looped and asked again
    while ( emptype != H | S | T)
    emptype = JOptionPane.showInputDialog( "Enter Employee Type again: H for hourly, T for Temporary Student, or S for Salaried only" );

    First, try indenting your code an extra tab or a coupla spaces at each opening curly brace and indenting it less at each closing curly brace. This will help you see where the braces aren't aligning.
    Second, you have an else buried in your code in an inappropriate place, essentially
    if (sometest) {do some stuff}
    else {do some other stuff}
    else {here is the invalid else}
    Third, usually you want to make sure you've validated your input before you procede onto your calculations and output, so the while loop you have at the end probably belongs at the beginning, possibly with a variable for the 'again' string.
    String againString;
    while ( emptype != H | S | T) {
    emptype = JOptionPane.showInputDialog( "Enter Employee Type"+again+": H for hourly, T for Temporary Student, or S for Salaried only" );
    againString = " again";

  • I lost my iLife DVD and need to download iDVD for a school project! I didn't mean to uninstall it!!! Where can I get it!!!

    I lost my iLife DVD and need to download iDVD for a school project! I didn't mean to uninstall it!!! Where can I get it!!! Some one smart about iDVD please save me! Thank you.

    Hi
    If You lost it - You need to get a new one. There are no free or legal downloads AT ALL.
    • Second handed from e-bay
    • See if Amazon - got any boxed iLife'11 DVDs left (cheque that iDVD is included)
    Apple do NOT sell any more.
    Yours Bengt W

  • Need help for flash builder

    i need help for flash builder 4 and papervison 3d. I need to create a slider with it ranges of value from 10 to 50 to adjust the camera values for the camera.fov and also need to create it for the yaw of the object from 0 to 360. I try to look for any slider event and classes in this program but cant find any, btw, i need to use the AS only project file.
    here is my codes:
    can you please tell me how i should modify the codes?
    package
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.events.Event;
        import org.papervision3d.materials.BitmapFileMaterial;
        import org.papervision3d.materials.BitmapMaterial;
        import org.papervision3d.objects.primitives.Sphere;
        import org.papervision3d.view.BasicView;
        [SWF (width="800", height="600", backgroundColor="0x000000",frameRate="30")]
        public class EarthBitmap extends BasicView
            private var sphere:Sphere;
            public function EarthBitmap()
                super(800 , 600);
                var earthmaterial:BitmapFileMaterial = new BitmapFileMaterial("../assets/Earth.jpg");
                sphere = new Sphere(earthmaterial,100,20,18);
                camera.fov = 25;
                scene.addChild(sphere);
                addEventListener(Event.ENTER_FRAME,rotateSphere);
            public function rotateSphere(evt:Event):void
                sphere.yaw(0.2);
                singleRender();

    Turn the click handler into a full on separate function. Then store all the views in an array and use Math.rand() to randomly choose one.
    Something like this:
    <fx:Script>
         <![CDATA[
              var questionsArray:Array = {question2,question3,question5,questionRed,questionGeography};
              function buttonClickHandler(event:MouseEvent){
                   var randomProblem:int = Math.floor(Math.random()*(questionsArray.length));     //generates a random integer between 0 and the total number of questions in the array (arrays are 0-based)
                   navigator.pushView(questionsArray[randomProblem]);
         ]]>
    </fx:Script>
    <s:Button id="randomProblemButton" label="Next Problem" click="buttonClickHandler(event)" />
    Haven't tested that, but something along that line should work

  • My daughter has created an imovie for a school project, last time she did this and downloaded it onto her memory stick the teach could not play it on their windows pc, how do we convert it or change it so the teacher can play.  thank you

    my daughter has created an imovie for a school project, last time she did this and downloaded it onto her memory stick the teach could not play it on their windows pc, how do we convert it or change it so the teacher can play.  thank you

    Meg\'s Dad wrote:
    …  I assume this format is what is needed to play on the class "Smart Board" also? …
    here in ol' Europe, school boards use chalk and are not smart …
    h264.mp4 is actually the most common 'standard' (4000 video 'standards' aaaaand counting)
    mp4 is indeed universal (Mac, Windows, Linux), and since YouTube, the h264 codec has a good installed base .....
    you can bump into probs only when it comes to sheer amount of data:
    for instance cheap 'digital frames' are sortof over-whelmed, if you try to playback 720/30p in high quality.
    I'm not familiar with 21st cent devices as SmartBoards ... again, it could happen, you have to reduce resolution/fps/bit-rate to avoid clutter&stutter in the video.
    I'm using such encoded files successfully on Playstation3, WD HD TV or flatscreenTVs with integrated usb-connection (via stick), etc
    imho, it should work welll .............. < fingers-crossed >

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • Is it possible to create a schedule in Labview . Example: i want to off the lights at 7pm and want it on at 8am. If there is can anyone teach, its for a school project. Im using labview 2011

    Is it possible to create a schedule in Labview . Example: i want to off the lights at 7pm and want it on at 8am. If there is can anyone teach, its for a school project. Im using labview 2011...thx

    Since this is a school project I recommend you do the work yourself. You will not learn asking others to do it for you. In addition, folks here will not do your homework for you. We are however more than wiling to answer specific questions for you. Post what you have done or tried and ask specific questions. I am confident you will get assistance.
    And to answer your question, yes LabVIEW can be used to implement a scheduling program.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Need help for Format HD

    Hi I need Help for Formating HD so Wat Key need hold on start up for format HD I apprciated you Help

    Jesus:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • _Where available_ +Click on Options button+
    +• Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)+
    +• Click OK+
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    cornelius

  • Need help for my requirement...

    Need help for my requirement...
    Hello Experts,
    I have report where users can input the company, housebank, account ID and posting date.
    Now in one column of my report named 'Cash in Bank', I need to get all postings from cash
    accounts with GL code ending in '0'. Now, I know that I can get the amounts in BSIS/BSAS
    but how do I link it with the proper bank and account?
    For example:
                       Cash in Bank
    Bank A
      Account ID 1     1,000,000
      Account ID 2     25,000,000
    Hope you can help me guys. Thank you and take care!

    hi Viraylab,
    each house bank you can find in table T012, in T012K you'll find the bank accounts to the housebank, the G/L account will be in T012K-HKONT.
    hope this helps
    ec

  • Need help for importing oracle 10G dump into 9i database

    hi, Someone help me to import oracle 10G dump into 9i database. I'm studying oracle . Im using oracle 10G developer suite(downloaded from oracle) and oracle 9i database. I saw some threads tat we can't import the higher version dumps into lower version database. But i'm badly need help for importing the dump...
    or
    someone please tell me the site to download oracle 9i Developer suite as i can't find it in oracle site...

    I didnt testet it to import a dump out of a 10g instance into a 9i instance if this export has been done using a 10g environment.
    But it is possible to perform an export with a 9i environment against a 10g instance.
    I am just testing this with a 9.2.0.8 environment against a 10.2.0.4.0 instance and is working so far.
    The system raises an EXP-00008 / ORA-37002 error after exporting the data segments (exporting post-schema procedural objects and actions).
    I am not sure if it is possible to perform an import to a 9i instance with this dump but maybe worth to give it a try.
    It should potentially be possible to export at least 9i compatible objects/segments with this approach.
    However, I have my doubts if this stunt is supported by oracle ...
    Message was edited by:
    user434854

  • Need Help for Nokia 6500 slide

    Hi all I'm A new Guy here ,
    But I do really need help for hard reset my phone
    I already try *#7073# But It doesn't work ,
    If Anybody know to make a hard reset please help

    rwss wrote:
    I'v got te same problem with my 6500 Slide, is there a button combination that we have to press
    to hard reset the 6500 Slide?!
    How does the 6500 slide hard reset?
    That's simple.
    All you have to do is:
    From MENU goto SETTINGS, When there scroll down and select 'Restore Factory Setting'.
    There are two options in there:
    "Restore Settings only"
    and
    "Restore all"
    Select "Restore All"
    When done the phone will delete every thing on the Phone memory(C:\)(contacts,picture,messages etc)
    and also restore phone to its original settings and will restart.
    This proceedure is mostly common on S40 phone.
    Hope this explain and solve the problem.

  • Need help for publishing web intelligence document (universe) into InfoView

    Post Author: mirage
    CA Forum: Publishing
    Hello all,
    I need help for publishing web intelligence document (universe) into InfoView.
    can't find this information in Business Objects Designer's Guide and in Business Objects Administrator Guide.
    Can somebody give short instructions how can I do it?
    Regards, Slava

    If the change between the 2 types of data has to happen dynamically during run time them
    1. Use 2 dataproviders
         a. Current
         b. Historic
    2. Merge the 2 dimensions
    3. Use Webi variable to switch between the measure of the current and historic universe
    Ex  if [year] < 2010 then historic.[expense] else current.[expense]
    Hope this helps,
    Divya

  • Need help for access list problem

    Cisco 2901 ISR
    I need help for my configuration.... although it is working fine but it is not secured cause everybody can access the internet
    I want to deny this IP range and permit only TMG server to have internet connection. My DHCP server is the 4500 switch.
    Anybody can help?
             DENY       10.25.0.1 – 10.25.0.255
                              10.25.1.1 – 10.25.1.255
    Permit only 1 host for Internet
                    10.25.7.136  255.255.255.192 ------ TMG Server
    Using access-list.
    ( Current configuration  )
    object-group network IP
    description Block_IP
    range 10.25.0.2 10.25.0.255
    range 10.25.1.2 10.25.1.255
    interface GigabitEthernet0/0
    ip address 192.168.2.3 255.255.255.0
    ip nat inside
    ip virtual-reassembly in max-fragments 64 max-reassemblies 256
    duplex auto
    speed auto
    interface GigabitEthernet0/1
    description ### ADSL WAN Interface ###
    no ip address
    pppoe enable group global
    pppoe-client dial-pool-number 1
    interface ATM0/0/0
    no ip address
    no atm ilmi-keepalive
    interface Dialer1
    description ### ADSL WAN Dialer ###
    ip address negotiated
    ip mtu 1492
    ip nat outside
    no ip virtual-reassembly in
    encapsulation ppp
    dialer pool 1
    dialer-group 1
    ppp authentication pap callin
    ppp pap sent-username xxxxxxx password 7 xxxxxxxxx
    ip nat inside source list 101 interface Dialer1 overload
    ip route 0.0.0.0 0.0.0.0 Dialer1
    ip route 10.25.0.0 255.255.0.0 192.168.2.1
    access-list 101 permit ip 10.25.0.0 0.0.255.255 any
    access-list 105 deny   ip object-group IP any
    From the 4500 Catalyst switch
    ( Current Configuration )
    interface GigabitEthernet0/48
    no switchport
    ip address 192.168.2.1 255.255.255.0 interface GigabitEthernet2/42
    ip route 0.0.0.0 0.0.0.0 192.168.2.3

    Hello,
    Host will can't get internet connection
    I remove this configuration......         access-list 101 permit ip 10.25.0.0 0.0.255.255 any
    and change the configuration ....      ip access-list extended 101
                                                                5 permit ip host 10.25.7.136 any
    In this case I will allow only host 10.25.7.136 but it isn't work.
    No internet connection from the TMG Server.

  • Need help for cenvat reversal

    Hi Friends,
    Need help for cenvat reversal.
    Reversed MIRO by MR8M & MIGO by 102 movement but not able to post & cancel cenvat by J1IEX.
    In table J_1IEXCHDR status = "P" and J1I5 does not update for document of 102 movement because reversal document of MIGO, i.e. material document with 102 movement type does not have excise tab. MBSM-Cancelled Material Documents, does not show any of the material documents.
    Want to reverse the cenvat credit, please help.
    --Anil Bhamere

    Hi,
    If I select Cancellation in MIGO then there is only Material Document option.
    In MIGO Purchase Order option shows for Goods Receipt, Goods Issue and Subsequet Adj.
    In this case I have been selected Goods Receipt option followed by purchase order number by which original goods receipt MIGO was created, selected 102 movement type and from line item respective MIGO document. The reversal document created successfully where as original MIGO document does not show in cancelled document list. When post option selected from J1IEX and entered vendor excise number then message appeared as No Part I exists for availing credit in excise invoice xxxxx.
    If Cancel option selected from J1IEX and entered vendor excise number then message appeared as Excise invoice xxxx has already been posted for vendor xxxxx.
    Please help.
    Regards,
    Anil Bhamere

Maybe you are looking for

  • CPP Assertion Error when navigating in Obiee 11g

    Hi, I have a report which uses SQL filters and I am trying to navigate from this report to another page. And I see the following error : Dashboard Display Error Assertion failure: isXsiTypeSqlExpression(rExpr) at line 67 of C:\ADE\aime_bi\bifndn\anal

  • Photoshop 5.0 deleting photos

    I want to delete multiple photos from photoshop 5.0. Also how do I change the setting so it automatically imports every photo on my computer. I know how to delete 1 photo at a time but how do I delete multiple thanks

  • How to update GRPO baseref field manually

    Dear All, We are creating PO using DTW option. Minimum line items in PO is 500. While posting GRPO by using Copy from option, it is very difficult for us to find the line items in the wizard. We also have partial receipts against PO. We want a option

  • A good Primer on srvctl - Getting things to autostart?

    Hello all, Ok, I've finally gotten 11gR2 clusterware installed. I have ASM installed. I've created some RAC database instances. How...wondering how to get all things to autostart on boot...and how to auto shutdown on a clean shutdown of servers. I kn

  • Cwms-1.5.1.6.A,enter the meeting must install certificates ?

                       I have installed cwms1.5,and use default self-signed certificates,but no one can enter the meeting unless install the certificates on  pc.what's the problems?