Newbie needs some simple help on triggers

Hi there. I need to create a trigger and am very new to this language and would love some help.
I have tables STUDENT, BOOKS, BORROWING.
When a student borrows a book, a composite entry is created in the BORROWING table. In the Books table, their is an attribute 'Borrowed' with a Y or N.
When a new record with the same Title as a book is created in borrowing, the value of 'borrowed' needs to be set to Y. So far I have the following, but forgot that I need to insert a WHERE clause so that it doesnt update every book, but only the book that causes the trigger.
I am having trouble with this- how would i go about doing this? Any help appreacited...
CREATE OR REPLACE TRIGGER book_returned_trigger
AFTER DELETE ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'N';
END;

Hi guys. Am really having some trouble now. Funny thing is I had it working!
I have the following tables:
>
CREATE TABLE STUDENT
     studentID VARCHAR2(8) NOT NULL,
     firstname VARCHAR2(20) NOT NULL,
     lastname VARCHAR2(20) NOT NULL,
     gender VARCHAR2(10),
     dob DATE,
     address VARCHAR2(20),
     suburb VARCHAR2(20),
     phone VARCHAR2(8),
     PRIMARY KEY(studentID)
CREATE TABLE BOOKS
     title VARCHAR2(20) NOT NULL,
     publisher VARCHAR2(20),
     year DATE,
     borrowed CHAR(1) CHECK (borrowed IN ('Y','N')),
     PRIMARY KEY(title)
CREATE TABLE BORROWING
     studentID VARCHAR2(8) NOT NULL,
     title VARCHAR2(20) NOT NULL,
     PRIMARY KEY(studentID,title),
     FOREIGN KEY(studentID) REFERENCES student(studentID),
     FOREIGN KEY(title) REFERENCES books(title)
>
My Triggers look like this:
>
CREATE OR REPLACE TRIGGER book_borrowed_trigger
AFTER INSERT ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'Y' WHERE title = :OLD.title;
END;
CREATE OR REPLACE TRIGGER book_returned_trigger
AFTER DELETE ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'N' WHERE title = :OLD.title;
END;
>
and some sample date:
>
INSERT INTO student (studentID, firstname,
lastname, gender, dob, address, suburb, phone)
VALUES ('34025492','Sally','Field','Female',
'26/FEB/1970','123 Latrobe Pde','Dromana','59812553');
INSERT INTO student (studentID, firstname,
lastname, gender, dob, address, suburb, phone)
VALUES ('98503345','Ray','Blackburn','Female',
'9/NOV/1954','52 Murawa Dve','Sorrento','59812433');
INSERT INTO books (title, publisher, year, borrowed)
VALUES ('Harry Potter','Roundhouse','1998','N');
INSERT INTO books (title, publisher, year, borrowed)
VALUES ('Twilight','Jones Books','2000','N');
INSERT INTO borrowing (studentID, title)
VALUES ('20737785','Harry Potter');
>
Now I cant get this trigger to change the value of the 'borrowed' column in 'BOOKS' to Y when I create a new record in the BORROWING table that references one of the Books.
Any idea why? I cant see why! Thanks for the help so far guys
Edited by: lockmac on Apr 1, 2009 12:40 AM

Similar Messages

  • I need some help adding music to my slideshow in iPhoto.  When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

  • Need some simple help..

    Basically what Im trying to do is write something that can repeatedly list in integers until a sentinel of 0 is entered, where it would then go on and do whatever is next. As simple as I thought it would be, I've been stuck on doing that for hours. Although I am still a java noob, it sounded easy at the time :/
    Anyway, heres the code I've managed to get after about the 6th or 7th write and rewrite stage now. It may not make too much since given how I can't seem to do much with it in the first place.
    import acm.program.*;
    public class FindRange extends ConsoleProgram {
         int sentinal = 0;
         public void run() {     
              println("Continue to enter numbers, and enter 0 to find the highest and lowest integer");
              while (true) {
                   int x = readInt("Enter a number:  ");
                   if (sentinal == x) {
                        println("test Posative");
                        break;
                   else {
                        println("test fail");
                        break;
         private void askInt() {
    }Anyway, I know this may have a real simple solution and I just cant figure something out to do, but Im hoping someone can explain something to me! Also, if anyone has some recommendations id love to hear why/how as well (never been a fan of people giving a solution and not telling how or why it works, if its a tad complex).
    Edited by: Cypher220 on Jan 7, 2010 5:43 PM

    Cypher220 wrote:
    import acm.program.*;
    public class FindRange extends ConsoleProgram {
         int sentinal = 0;
         public void run() {     
              println("Continue to enter numbers, and enter 0 to find the highest and lowest integer");
              while (true) {
                   int x = readInt("Enter a number:  ");
                   if (sentinal == x) {
                        println("test Posative");
                        break;
                   else {
                        println("test fail");
                        break;
         private void askInt() {
    What happens when you run it?
    Do you have a question to ask?
    Anyway, I know this may have a real simple solution and I just cant figure something out to do, but Im hoping someone can explain something to me! Birds can fly, fish can swim. Not sure if this is what you wanted
    Also, if anyone has some recommendations id love to hear why/how as well (never been a fan of people giving a solution and not telling how or why it works, if its a tad complex).Ask questions.
    Mel

  • Hi, i need some simple help please

    Below is the current code for display and counting values in a table...
    boolean learningstyle = false;
    String lstyleresult = "";
    RS=Stmt.executeQuery("select data from learningstyle where userid='"+sr_studentid+"' order by submitted desc,id desc");
         if (RS.first())
              learningstyle = true;
              String data = RS.getString("data");
              String[] arraydata = data.split(",");
              String[] visualnos = {"4","6","8","12","13","17","22","24","25","29","33","35","37"};
              String[] auditorynos = {"1","3","9","11","14","16","18","21","26","28","32","36","38"};
              String[] doingnos = {"2","5","7","10","15","19","20","23","27","30","31","34","39"};
              int vscore=0;
              int ascore=0;
              int kscore=0;
              for (int i=0;i<visualnos.length;i++)
                   if(arraydata[Integer.parseInt(visualnos[i])-1].equals("Y"))
                        vscore++;
              for (int i=0;i<auditorynos.length;i++)
                   if(arraydata[Integer.parseInt(auditorynos[i])-1].equals("Y"))
                        ascore++;
              for (int i=0;i<doingnos.length;i++)
                   if(arraydata[Integer.parseInt(doingnos[i])-1].equals("Y"))
                        kscore++;
              lstyleresult = "Visual: "+vscore+"/"+visualnos.length+"<br /><br />Audio: "+ascore+"/"+auditorynos.length+"<br /><br />Kinetic: "+kscore+"/"+doingnos.length;
         else
              learningstyle = false;
    %>
    I want the JSP code to run the query above OR run the query below:
    RS=Stmt.executeQuery("select data from learningstyle where userid='"+sr_studentid+"' and input_type='manual' order by submitted desc,id desc");
    How would i do this?

    ok how does the following look?
    <%
         // +------------------------------------------------------------------------
         // | LEARNING STYLE DATA QUERY
         // +------------------------------------------------------------------------
         boolean learningstyle = false;
         String lstyleresult = "";
         int vscore=0;
         int ascore=0;
         int kscore=0;
         for (int i=0;i<visualnos.length;i++)
                   if(arraydata[Integer.parseInt(visualnos)-1].equals("Y"))
                        vscore++;
         for (int i=0;i<auditorynos.length;i++)
                   if(arraydata[Integer.parseInt(auditorynos[i])-1].equals("Y"))
                        ascore++;
         for (int i=0;i<doingnos.length;i++)
                   if(arraydata[Integer.parseInt(doingnos[i])-1].equals("Y"))
                        kscore++;
              lstyleresult = "Visual: "+vscore+"/"+visualnos.length+"<br /><br />Audio: "+ascore+"/"+auditorynos.length+"<br /><br />Kinetic: "+kscore+"/"+doingnos.length;
         RS=Stmt.executeQuery("select userid from learningstyle where userid='"+sr_studentid+"' order by submitted desc,id desc");
         if (RS.first())
              PreparedStatement pStmt = ConnStar.prepareStatement("select data from learningstyle where userid='"+sr_studentid+"' order by submitted desc,id desc");
              learningstyle = true;
              String data = RS.getString("data");
              String[] arraydata = data.split(",");
              String[] visualnos = {"4","6","8","12","13","17","22","24","25","29","33","35","37"};
              String[] auditorynos = {"1","3","9","11","14","16","18","21","26","28","32","36","38"};
              String[] doingnos = {"2","5","7","10","15","19","20","23","27","30","31","34","39"};
              else if
              PreparedStatement pStmt = ConnStar.prepareStatement("select data from learningstyle where userid='"+sr_studentid+"' and input_type='manual' order by submitted desc,id desc");
              String data = RS.getString("data");
              String[] arraydata = data.split(",");
              String[] visualnos = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
              String[] auditorynos = {"14","15","16","17","18","19","20","21","22","23","24","25","26"};
              String[] doingnos = {"27","28","29","30","31","32","33","34","35","36","37","38","39"};
         else
              learningstyle = false;
    %>

  • I need some simple help here, worth $1 duke buck

    please tell me what I am missing here. Thanks.
    //Team Patrick, Stephen, Rich
    //Week 3 team assignment due 10/9/03
    //Joanne Kuzman instructor
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Cater
         public static void main(String[] args) throws Exception
              double feeCorporate = 500.00;
              double feePrivate = 300.00;
              double feeNonprofit = 150.00;
              double feeSpecial = 200.00;
              double taxRateC = 1.0775;
              double taxRateP = 1.85;
              char response;
              System.out.println("Welcome to Local Caterer's Company Scheduling");
              System.out.println("Please choose the type of event.");
              System.out.println
              ("Your Choices are C for corporate events,P for private events, N for nonprofit and S for Special events");     
              response = (char)System.in.read();
              System.in.read(); System.in.read(); System.in.read(); System.in.read();
              while (response != "C" && != "P" && != "N" && != "S")
                   System.in.read(); System.in.read();
                   System.out.println("Your entry can only be C, P, N, or S");
                   response = (char)System.in.read();
              if(response = "C")
                   System.out.println("This Corporate event will cost " + feeCorporate " and Pop will manage this event");
                   System.out.println("The total with tax will be " + feeCorporate * taxRateC);
              else if(response = "P")
                   System.out.println("This Private event will cost " + feePrivate " and Pop will manage this event");
                   System.out.println("The total with tax will be " + feePrivate * taxRateP);
              else if(response = "N")
                   System.out.println
                   ("This Nonprofit event will cost " + feeNonprofit " and Mom will manage this event");
                   System.out.println
                   ("Nonprofit events are not taxed. Please be certain to obtan a tax exempt card from the organization and keep it on file");
              else if(response = "S")
                   System.out.println
                   ("This Nonprofit event will cost " + feeSpecial " and Mom will manage this event");
                   System.out.println("Please see Mom for tax rate on these events");
              else
                   System.out.println("Invalid Entry");
                   System.exit(0);

    I am not sure which programming lang u used to program with but in java things r a bit diffrent. you had a lot of small mistakes. anyway your code should look like this (copy paste it and don't worry)
    public class Cater
         public static void main(String[] args) throws Exception
              double feeCorporate = 500.00;
              double feePrivate = 300.00;
              double feeNonprofit = 150.00;
              double feeSpecial = 200.00;
              double taxRateC = 1.0775;
              double taxRateP = 1.85;
              char response;
              System.out.println("Welcome to Local Caterer's Company Scheduling");
              System.out.println("Please choose the type of event.");
              System.out.println
              ("Your Choices are C for corporate events,P for private events, N for nonprofit and S for Special events");
              response = (char)System.in.read();
              System.in.read(); System.in.read(); System.in.read(); System.in.read();
              while ((response != 'C') && (response!= 'P') && (response!= 'N') && (response!= 'S'))
                   System.in.read(); System.in.read();
                   System.out.println("Your entry can only be C, P, N, or S");
                   response = (char)System.in.read();
              if(response == 'C')
                   System.out.println("This Corporate event will cost " + feeCorporate+ " and Pop will manage this event");
                   System.out.println("The total with tax will be " + feeCorporate * taxRateC);
              else if(response == 'P')
                   System.out.println("This Private event will cost " + feePrivate+ " and Pop will manage this event");
                   System.out.println("The total with tax will be " + feePrivate * taxRateP);
              else if(response == 'N')
                   System.out.println("This Nonprofit event will cost " + feeNonprofit+ " and Mom will manage this event");
                   System.out.println("Nonprofit events are not taxed. Please be certain to obtan a tax exempt card from the organization and keep it on file");
              else if(response == 'S')
                   System.out.println("This Nonprofit event will cost " + feeSpecial +" and Mom will manage this event");
                   System.out.println("Please see Mom for tax rate on these events");
              else
                   System.out.println("Invalid Entry");
                   System.exit(0);

  • Need some quick help - fairly urgent!

    I've just taken over a new job and have been the task of finishing the new brochure for Christmas, there's not a lot to do but a lot of the measurements need changing
    This is the layout I'm dealing with..
    All the boxes have been made in Illustrator
    The text has been done in In'Design and it seems every piece of text is it's own box if that makes sense
    My question is, if I select the whole specification box - copy, paste it into Adobe Illustrator and change the text there, then paste the edited box back into In-Design, will I lose quality when it gets printed?
    I'm worried if I do it this way it may come out blurred? Or am I just worrying about nothing?

    I couldn't find an Illy file in the end and have ended up creating tables in ID to replicate what was already there!
    Didn't take very long and I guess if I didn't do it now, I'd come across the same situation next time!
    Date: Wed, 30 Nov 2011 08:48:07 -0700
    From: [email protected]
    To: [email protected]
    Subject: Need some quick help - fairly urgent!
        Re: Need some quick help - fairly urgent!
        created by Peter Spier in InDesign - View the full discussion
    There certainly are viable "quick fix" solutions proposed here, and if the dealine is looming and this file never needs to be touched again I might be tempted, but they are only postponing the pain for a file that needs periodic updates, and I wouldn't waste effort on them, myself, when that time can be put toward a proper rebuild now if that's the ultimate goal.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4054725#4054725
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4054725#4054725. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in InDesign by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Replaced zd8000 motherboard and need some troubleshooting help please............

    Hello All,
     I just replaced the motherboard on our HP zd8000 (pentium 4, 3.0ghz, 2gb ram, Win XP) with a used but tested good MB and need some help with the following.
    1) I now cannot play DVD movies as the error no "dvd decoder" present which was not an issue before?  Where can I go to get a free decoder that will work, as Windows only shows paid versions?  We have the dvd burner/reader with lightscribe. SOLVED! CNET HAD DECODER.
    2) The internal temperature, according to SpeedFan, is running around 140 degrees with just some Internet browsing.  Is that a normal temperature because I only have one of three fans running on the laptop?  Is there anyway of making all three fans run to be sure there are no issues?  I am positive I hooked up everything but again only one fan seems to be running?
    3) I discovered some of the pins were damaged in the card reader.  I may get the Seller to give me a discount, no intention of tearing it apart simply for that, but is there any concern of short or otherwise?
    4) Our battery stopped charging years ago, these were notorious for such, but I purchased a new one last year and hoped the replacement MB would allow charging again.  No such luck though.  Is there anything I can do, BIOS update etc, to make the battery charge?
    5) Anything you folks can think of for me to test to insure the new motherboard is working properly?
    Thanks, Ralph 
    P.S. This was a correct replacement board according to MB serial numbers.  Everything else seems to be functioning properly other than mentioned.  Our graphics went out on the original MB.
    This question was solved.
    View Solution.

    Some of the wires had pushed out of the harness that connected the other two fans.  I double checked and re-attached those so now the laptop is running quite a bit cooler.
    EVERYTHING IS GOOD TO GO!

  • Remember me.....well i need some real help now....:)

    Hello guys,i hope that u remember me...if not i hope that u ll help me anyway....
    well,i had an assignment for my university...i posted it and u told to start reading several books and try to write some code....
    i came up with the following code:
    import java.util.Random;
    import java.util.*;
    import java.text.DateFormat;
    class Account {
         double initbal;
         double deposit;
         double withdraw;
    //Account constructor
    Account() {
         initbal=0;
         deposit=0;
         withdraw=0;
    //method for calculating the balance
    double balance() {
         return (initbal+deposit)-withdraw;
    class BankAccount {     
         double initbal;
         private double deposit;
         private double withdraw;
         public static void main(String args[]) {
         Account Dimitris=new Account();               //call the constructor
         CurrentAccount Over=new CurrentAccount();
    try {     //exception added for fault parameters
         Dimitris.initbal=Double.parseDouble(args[0]);     //string parsing into a double
         Dimitris.deposit=Double.parseDouble(args[1]);     //string parsing into a double
         Dimitris.withdraw=Double.parseDouble(args[2]);     //string parsing into a double
         } catch (ArrayIndexOutOfBoundsException e) {
              System.out.println("You must enter three values!!");
         } catch (NumberFormatException e) {
              System.out.println("Only numbers are allowed!!");
         double AvlOvr;
         double bal;
         bal=Dimitris.balance();          //method called
         System.out.println("Initial balance is: "+Dimitris.initbal);
         System.out.println("Deposit Amount is: "+Dimitris.deposit);
         System.out.println("Withdraw amount is: "+Dimitris.withdraw);
         System.out.println("Overdraft limit is: "+Over.AvlOvr);
    if (withdraw>(initbal+deposit)) {
         System.out.println("Insufficient Funds");
    else
         System.out.println("Balance is: "+bal);
         System.out.println("Available Funds is: "+(bal+Over.AvlOvr));
         //display the date and time for the current locale     
         Date date=new Date();
         DateFormat dateFormatter=DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT);
         System.out.println(dateFormatter.format(date));
    class CurrentAccount extends BankAccount {
    private float accId;
    double AvlOvr;
    CurrentAccount() {
    double ovdr;
    ovdr=100;
    AvlOvr=ovdr;
    interface Personal {
    void Deposit ();
    void Withdraw ();
    the thing is that i need some help cause i cant find some sollutions....
    i d like to give to the user a random id....
    then at the CurrentAccount subclass i d like to add a Username to the user.Then Level 2 worries me as well.....I ll post u my assignment so u can have a look....If u could help me with Level 2 sollution and the thing that i told u before i d be grateful.......
    by the way..i hope that u all guys have nice holidays!!!
    Here is the assignment:
    JAVA LAB ASSIGNMENT � B241
    Bank Account
    Level 1
    Create a bank account that reads in the following information about a single customer
    account:
    Initial balance
    Deposit amount
    Withdraw amount
    Current Date
    Give the account holder a random account id number.
    Display error messages if the number of parameters is incorrect or negative parameters are
    entered.
    Verify that the amount being withdrawn is available (i.e. make sure that the initial balance +
    deposit amount is greater than or equal to the amount being withdrawn).
    Calculate the balance amount in the account after the transaction has been completed.
    Tasks:
    - Create a BankAccount class, which defines a bank account
    - Use command line arguments to read in the account information
    - The customer account values are private and accessible only through the
    BankAccount class
    - Use the file, InsufficientFundsException.java given to you (Location:
    /global_ro/rekha/B241/assignment) to create an Exception class called
    InsufficientFundsException.class that throws an exception if an
    InsufficientFundsException occurs in your BankAccount class. Make the necessary
    changes to the file if you feel the need to do so.
    - Print out the following information:
    2
    account holder�s id
    balance amount
    amount being withdrawn
    the current date and time
    (Hint: this will occur when the amount withdrawn is more than the total amount in the
    account. Your withdraw method throws the InsufficientFundsException exception which
    should be caught in your main program from where you are calling the withdraw method).
    Subclass the BankAccount class for the specifics of a CurrentAccount class that adds an
    additional field to the already existing information:
    User name
    The account balance and account id values should still be private and now accessible only
    through the CurrentAccount subclass.
    Allow the CurrentAccount class to provide overdraft protection of up to �100.
    Task:
    - Incorporate the additional functionalities into your initial program and print out the
    values as before.
    ********************************END OF LEVEL 1 **************************
    Level 2
    Add the following functionalities to your Level 1 program.
    Define an interface named Personal, consisting of two methods:
    Deposit
    Withdraw
    Read in the account information specified in Level 1 for more than one user through the
    command line parameters and display appropriate error messages as before.
    Calculate the balance amount in each account after the transaction has been completed.
    Tasks:
    - Increment the account id each time a customer is added (For instance, if the first
    customer id is 100, the next id should be 101 and so on).
    - Implement the Personal interface in the BankAccount class.
    - Print out the customer information for all customers as you did in Level 1.
    *****************************END OF LEVEL 2*****************************
    Level 3
    Extend the above features to add some more personal information about the customer such
    as:
    a. Name: surname first name
    b. Date of birth: day/month/year
    c. Address: street
    Town
    Postcode
    d. Phone: home number work number
    e. E-mail: e-mail address
    Customer�s data is stored in a file. It is retrieved from the file when the bank is opened and
    stored in a memory buffer. The memory buffer is updated after every transaction. The
    contents of the memory buffer are written into the file when the bank is closed.
    Design a data management structure of the bank with several customers. The bank performs
    �deposit� and �withdraw� transactions by using Java I/O streams.
    Use the SimpleClient.java and SimpleServer.java files (Location:
    /global_ro/rekha/B241/assignment) as a base for creating your own Client and Server
    windows. Make the necessary changes to the files for them to work within your programs.
    Tasks:
    - Create a non-graphical user interface to be able to
    o enter customer�s data
    o display customer�s personal and account data after every transaction
    - Write a JAVA program to read and write customers data from/to a file.
    - Create a client � server networking environment using Java�s networking capabilities
    such that data is entered through the server window and displayed by the client in the
    client window.

    Ela re si k eimaste k sinonomatoi...anyway...could you pleaze help me with my assignment...my other problem is that i've writen some more code for the 3rd part where it says add some more fields for the customers.I save them in a file and i restore them but i dont know how can i call them when the bank is opened....here's the rest of the code....
    import java.io.*;
    public class UserInfo {
    public static void main(String[] args)
    throws IOException {
         String k,l,m,n,o,p,q,r;
    BufferedReader stdin = new BufferedReader(
    new InputStreamReader(System.in));
    System.out.print("First name:");
         k=stdin.readLine();
         System.out.print("Last name:");
         l=stdin.readLine();
         System.out.print("D.O.B:");
         m=stdin.readLine();
         System.out.print("Address:");
         n=stdin.readLine();
         System.out.print("Town:");
         o=stdin.readLine();
         System.out.print("Postcode:");
         p=stdin.readLine();
         System.out.print("Phone:");
         q=stdin.readLine();
         System.out.print("E-Mail:");
         r=stdin.readLine();
         try {
    DataOutputStream out = new DataOutputStream(
    new BufferedOutputStream(
    new FileOutputStream("Data.txt")));
         out.writeUTF(k);
         out.writeUTF(l);
         out.writeUTF(m);
         out.writeUTF(n);
         out.writeUTF(o);
         out.writeUTF(p);
         out.writeUTF(q);
         out.writeUTF(r);
         out.close();
         DataInputStream in = new DataInputStream(
    new BufferedInputStream(
    new FileInputStream("Data.txt")));
         System.out.println(in.readUTF());
    System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         System.out.println(in.readUTF());
         } catch (NumberFormatException e) {
         System.out.println(e);
    }

  • I need some serious help with Oracle Database....PLEASE!!

    I am using Microsoft Virtual PC 2007 that has Oracle Database 10g and Wondows XP installed on it.
    Database instance is DOWN but that is not the problem
    Listener is UP
    Agent Connection to Instance is DOWN, and I cannot get this running!
    How can I fix this problem? I am not an expert, but I have been trying for a long time to fix this issue, but I can't. It just came to the point that I want to grab my pc and throw it across the room.
    Error message: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
    Here is my LISTENER.ORA file:
    # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.109)(PORT = 1521))
    Here is my TSNNAME.ORA file:
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.109)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Once again, I am not an expert, so please try to explain it as simple as possible...I know, I am an idiot when it comes to networking issues.
    if you guys need some more information, just let me know!
    Thank you!

    What I mean is that I can get the Instance UP with no problem, but the Connection with the Instance is the problem.
    C:\Documents and Settings\Paolo\Desktop\courselabs\labs>lsnrctl service
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-NOV-2009 21:38
    :06
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:144 refused:0 state:ready
    LOCAL SERVER
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: PAOLOSCAMARDELL, pid: 2576>
    (ADDRESS=(PROTOCOL=tcp)(HOST=paoloscamardell)(PORT=2307))
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:144 refused:0 state:ready
    LOCAL SERVER
    The command completed successfully
    C:\Documents and Settings\Paolo\Desktop\courselabs\labs>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-NOV-2009 21:52
    :03
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 25-NOV-2009 11:50:27
    Uptime 0 days 10 hr. 1 min. 39 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.109)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    C:\Documents and Settings\Paolo\Desktop\courselabs\labs>

  • Newbee in j2me needs some starter help

    Hi,
    I am a newbee in j2me and need a starter help.
    My aim is work on mobile applications/services and for that what stuff I need. I have already downloaded wireless kit. Does I require some additions softwares and what?
    Can I find tutorials and starter help and from where?
    Thanks in anticipation.
    Regards,
    Navin.

    You can refer to article 'Think small with J2ME at' -
    http://www-106.ibm.com/developerworks/wireless/library/wi-j2me/
    It shows by example deployment of a sample application using wireless toolkit.
    Manish.

  • GT70 680m/8970m troubleshooting - need some experienced help!

    Hi!
    Looping for some serious help...
    After some erratic behavior my i7 3rd gen GT70 just stopped working with MSI 680m 4GB. The card shows on occasions in manager, but both - discrete and HD4000 have no installed drivers and wont work unless 680 is plugged out (then intel kicks in without prob). That happened after some automatic driver updates and possibly BIOS update. Tried a ton of these and Bioses, rather randomly, trying to solve the disappearance of my 680m from control panel, but non of them worked. To make the things worse, I've messed with EC firmware editions trying the "beta" t25,21,16,17 - one of them bricked the lappi for good... Had MSI re-flash the bios (couldn't do the blind flash myself) but they say they can't help me with 680 since it is from GT60 originally and it's not supported by GT70 (I switched it from 675 to 680 in the other MSI laptop some 8 months ago - both worked without a problem until the issue). Don't have access to check my 680m in another MSI to check if it's working and is no hardware failure, but have access to 8970m from CLEVO for some decent bucks - was wondering which bios should I install to run it in my GT70 or which bios/EC firmware to flash so my old 680 start working again... This or that... Any idea? Guys? Svet? Sure will make the donation if needed of course!
    J

    Quote from: pjaca on 12-April-15, 13:56:25
    Checked that out. What I need is some info which BIOS to use in GT70 0ND for 680m or 8970m, particularly. My 680m stopped working after the bios/ec firmware update, still shows in manager but tries to the same resources as integrated Intel HD resulting in both not working. Is there a bios that allows for permanently switching off optimus and integrated gpu? Or the bios that will accept radeon 8970m (that works perfectly in 2nd gen MSI gt780 by the way...). Any ideas?
    No special BIOS is required to support 680M. Just use the latest BIOS release for model GT70 0NE by MSI, it should be working on the machine as long as there is no other strange issue, like a malfunction VGA card/Mobo....

  • My ipod is majorly screwed up and i need some serious help

    k well lets see
    error states 'can't mount ipod'
    so i tried checking all the wires, restoring the ipod (which didnt work because it couldnt find it) and i scanned all my files for viruses.
    my ipod also makes funny clicking noises when i dont even touch it...
    im just a kid guys.. i need some serious ipod whizz to help me out.. im desperate! ive tried everything

    Hi,
    Firstly please try to deal with "can't mount iPod" issue
    http://docs.info.apple.com/article.html?artnum=93499

  • Getting Started with Podcasting - need some direction/help

    hi,
    I need some information on how to get started Podcasting. Any good online resources, software, etc.
    I have looked at garageband3 on my iMac and it seems to be quite good, but what else is out there and does anyone have any tips or suggestions on getting started?
    Thanks in advance!!
    BCA

    I still have GB 2 so I don't know about GB's podcasting abilities (though some of the questions I see here suggest it's not all that wonderful).
    I use, and would recommend, Podcast Maker:
    http://www.potionfactory.com/podcastmaker/
    which is $29.95 and is available on a 30 day free trial.
    You make your podcast using GB or whatever program you want, and save it as an MP3 file. You then open it in Podcast Maker and add the summary and description fields, and if you want it to be an enhanced podcast you add chapters and the artwork. It will then upload it to your iDisk or the server of your choice, create the XML file, and ping the Apple Store if required. All this is seamless and easy to use.

  • I'm a newbie and need some basic help...

    I'm a newb trying to teach myself Director. I'm trying to
    make a menu and I'm having some problems....
    I have 3 main buttons. When you click one of the main
    buttons, 3 sub buttons pop up next to the button pressed. When one
    of those sub buttons is pressed, a box pops up to the right of the
    sub buttons and has a list inside containing links to movies. When
    one of the links is pressed i want the movie to take the place of
    the links in the box. When the movie is done playing it will
    disappear and show the links again.
    I uploaded what I have done here...
    http://www.lohrmandesign.com/uploads/Template.dir
    If you look at it, could you tell me what I've done
    correctly, and how I should go about implementing the rest of the
    menu? I imagine you have to use director movies within the main
    director movie, but I haven't figured out how to implement that. Or
    possibly use the .visible command? Thanks for any help...Online
    resources and examples are scarce for Director it seems.
    And I'm not sure if i have to upload all the pics for you to
    view my movie correctly, If I do, just let me know...

    quote:
    Originally posted by:
    Newsgroup User
    I haven't looked at your Director file, but what you want to
    do sounds
    pretty simple. First of all, though, can you clarify what you
    mean by
    "movie," because Director's terminology makes it kind of
    confusing. Are
    you speaking of a Director movie, or digital video?
    If you want to jump to a different Director movie, simply do
    something
    like this:
    on mouseUp me
    go to frame "StartMovie" of movie "Option1"
    end
    To get back to your menu, just use an exitFrame command at
    the end of
    the Director movie that takes you back there.
    If you're referring to starting a digital video, just put
    your video
    somewhere in the same Director file your menu is in, label it
    with a
    marker, and simply jump to that marker. Like this:
    on mouseUp me
    go to frame "Video1"
    end
    To get back to your menu at the end of the video do something
    like this:
    on exitFrame me
    if sprite(5).movieRate = 1 then
    go to the frame
    else
    go to frame "Menu"
    end if
    end
    Hope that helps.
    Sorry, I should have clarified...When you click on a sub
    category button, a Quicktime video will play, not a Director
    "movie"...Thanks for the help! using the method you described, that
    would make the menu disappear when the video is played, and reload
    the menu when the movie is done, right? I want the menu to stay
    visible while the movie is playing...

Maybe you are looking for

  • How can I remove albums from the "Music" icon on iPad2?

    When I select the "Music" icon on my iPad2, there are two albums I have placed there that I would like to remove.  How can I do that? Thanks for your help. Vernon

  • Need help in creating prompt for Month To Date Report.

    <span class="postbody"><font size="2">Hi All <br />I need to create a Month To Date Report using month(Start date & End date) as prompts, By default it has to run on the previous month data or if user selects his own range of dates then it has to bri

  • Error in Run Package

    COST ALLOCATION LOGIG.LGF *XDIM_MEMBERSET TIME=2008.JAN,2009.JAN *XDIM_MEMBERSET P_ACCT=COST *XDIM_MEMBERSET CATEGORY=PLAN,ACTUAL *XDIM_MEMBERSET P_CC=$SOURCE$,$TARGET$, *WHEN P_CC *IS "EUROPE"        *REC(EXPRESSION=$E_TOTALCOST$,TIME=2009.JAN,CATEG

  • Reading .ZIP files using File Adapter

    Hi, I am using BPEL File Adapter to read files. The files to be read are XML files which are in zipped format. so how should I read these .zip files and extract the XML files from that. Thanks /Kiran.

  • How can I listen to Amazon sample songs on my ipad 2 gen ?

    How can I lister to Amazon sample songs on my ipad 2 gen ? Thank you.