Help needed on to write a program on connecting to data source

I would to program a class that connect to data source without any manually configure.
Is there other way that i could use intsead of using
db = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=MyServerName;Database=MyDataBase","","");
My project requires me to use JDBC-ODBC Bridge on connecting to data source on client machine
Is there any other way?

Oh, oh,
why???
It's so simple to do a JDBC connection using the same connection params, which you use for your VB program's connnection.
If your VB prog uses a system or user DSN configured via control panel, then use the same DSN in your Java prog.
Dear karentan,
you have just the same question now active in 4 or 5 different topics. And I and others have not been able to understand what really is your problem, I fear.
Would you please do two things:
1) Start a new topic (yes, another one!) and tell us there what exactly is your problem. What do you want to do?
Not: is it possible ... but: I want ...
2) Go to all the other topics you spreaded here and post the link of your new topic there, so that the poor people who try to answer your 5 (always the same) questions know that they can spare their time.
Please, hold this forum useful!
And let us come to the point that you are helped and we are glad!

Similar Messages

  • Really need help on how to write this program some 1 plz help me out here.

    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    ?Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.?
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)
    For Part 1 this is what i got
    import java.util.Scanner;
    public class Window
         public static void main(String[] args)
              double length, width, glass_cost, perimeter, frame_cost, area, total;
              Scanner keyboard = new Scanner (System.in);
              System.out.println("Enter the length of the window in inches");
              length = keyboard.nextInt();
              System.out.println("Enter the width of the window in inches");
              width = keyboard.nextInt();
              area = length * width;
              glass_cost = area * .5;
              perimeter = 2 * (length + width);
              frame_cost = perimeter * .75;
              total = glass_cost + frame_cost;
                   System.out.println("The Length of the window is " + length + "inches");
                   System.out.println("The Width of the window is " + length + "inches");
                   System.out.println("The total cost of the window is $ " + total);
         Enter the length of the window in inches
         5
         Enter the width of the window in inches
         8
         The Length of the window is 5.0inches
         The Width of the window is 5.0inches
         The total cost of the window is $ 39.5
    Press any key to continue . . .
    Edited by: Adhi on Feb 24, 2008 10:33 AM

    Adhi wrote:
    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.Looks like homework to me.
    What have you written so far? Post it.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    “Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.”
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.So this is where you actually have to do something. My guess is that you've done nothing so far.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)Man, this specification writes itself. Sit down and start coding.
    One bit of advice: Nobody here takes kindly to lazy, stupid students who are just trying to con somebody into doing their homework for them. If that's you, better have your asbestos underpants on.
    %

  • How to Write Log Message in a XML Data Source Report

    Hi Friends,
    Can anyone help me out what is the process of writing a log file in the XML Data Source Report. for eg: in Plsql we use FND_LOG.PUT_LINE to print the Log message in the Concurrent Request Output. in the similar manner, when we develop a report using XML, where we write Coding in XQuery of XML, what is the process need to follow to print the logs for the XQuery.
    Any inputs/Suggestion on this Highly appreciable.
    Thanks in advance.

    Create an RMI application (for example) that writes the log, and let all logging calls call that remote application.
    Something like that is the only feasible way that doesn't require you to have a drive on the remote machine mapped to the local one (which causes its own problems as you could have multiple simultaneous write attempts...).

  • Help needed in executing pl/sql programs

    hi all
    iam new to PL/SQL programming
    i have installed oracle 9i
    iam trying to practice some sample pl/sql programs
    i have opened oracle 9i and typed these commands
    sql>ed sum
    then a notepad opens where i type my pl/sql program and save it and then return back to oracle 9i and type this
    sql>@ sum
    then my pl/sql program gets executed.......but iam not getting any output
    its comig as procedure implemented succesfully
    is it compulsory to open notepad to execute pl/sql progams or we can direclty type the programs in oracle 9i
    please help in this matter ASAP
    Regards
    Suresh

    Yes, you can type the program directly at the SQL prompt, but editing will be a bit difficult.
    You should use some good editor that allows you to edit properly and then run like you did.
    You need to do:
    SQL> set serveroutput onbefore running your program to see dbms_output messages.

  • Help needed on a TicTacToe java program

    I am very new to java and our teacher has given us a program
    that i am having quite a bit of trouble with. I was wondering if anyone could help me out.
    This is the program which i have bolded.
    {You will write a Java class to play the TicTacToe game. This program will have at least two data members, one for the status of the board and one to keep track of whose turn it is. All data members must be private. You will create a user interface that allows client code to play the game.
    The user interface must include:
    �     Boolean xPlay(int num) which allows x to play in the square labeled by num. This function will return true if that play caused the game to end and false otherwise.
    �     Boolean oPlay(int num) which allows o to play in the square labeled by num. This function will return true if that play caused the game to end and false otherwise.
    �     Boolean isEmpty(int num) will check to see if the square labeled by num is empty.
    �     Void display() which displays the current game status to the screen.
    �     Char whoWon() which will return X, O, or C depending on the outcome of the game.
    �     You must not allow the same player to play twice in a row. Should the client code attempt to, xPlay or oPlay should print an error and do nothing else.
    �     Also calling whoWon when the game is not over should produce an error message and return a character other than X, O, or C.
    �     Client code for the moment is up to you. Assume you have two human players that can enter the number of the square in which they want to play.
    Verifying user input WILL be done by the client code.}

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question at the Java Programming forum. The URL to this forum is:
    http://forum.java.sun.com/forum.jspa?forumID=31
    Cheers
    Giri

  • Help needed creating a linked list program

    I have been trying to create a linked list program that takes in a word and its definition and adds the word to a link list followed by the definition. i.e. java - a simple platform-independent object-oriented programming language.
    the thing is that of course words must be added and removed from the list. so i am going to use the compareTo method. Basically there a 2 problems
    1: some syntax problem which is causing my add and remove method not to be seen from the WordList class
    2: Do I HAVE to use the iterator class to go thru the list? I understand how the iterator works but i see no need for it.
    I just need to be pointed in the right direction im a little lost.................
    your help would be greatly appreciated i've been working on this over a week i dont like linked list..........
    Here are my 4 classes of code........
    * Dictionary.java
    * Created on November 4, 2007, 10:53 PM
    * A class Dictionary that implements the other classes.
    * @author Denis
    import javax.swing.JOptionPane;
    /* testWordList.java
    * Created on November 10, 2007, 11:50 AM
    * @author Denis
    public class Dictionary {
        /** Creates a new instance of testWordList */
        public Dictionary() {
            boolean done=false;
    String in="";
    while(done!=true)
    in = JOptionPane.showInputDialog("Type 1 to add to Dictionary, 2 to remove from Dictionary, 3 to Print Dictionary, and 4 to Quit");
    int num = Integer.parseInt(in);
    switch (num){
    case 1:
    String toAdd = JOptionPane.showInputDialog("Please Key in the Word a dash and the definition.");
    add(toAdd);
    break;
    case 2:
    String toDelete = JOptionPane.showInputDialog("What would you like to remove?");
    remove(toDelete);
    break;
    case 3:
    for(Word e: list)
    System.out.println(e);
    break;
    case 4:
    System.out.println("Transaction complete.");
    done = true;
    break;
    default:
    done = true;
    break;
       }//end switch
      }//end while
    }//end Dictionary
    }//end main
    import java.util.Iterator;
    /* WordList.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordList that creates and maintains a linked list of words and their meanings in lexicographical order.
    * @author Denis*/
    public class WordList{
        WordNode list;
        //Iterator<WordList> i = list.iterator();
        /*public void main(String [] args)
        while(i.hasNext())
        WordNode w = i.next();
        String s = w.word.getWord();
        void WordList() {
          list = null;
        void add(Word b)
            WordNode temp = new WordNode(b);
            WordNode current,previous = null;
            boolean found = false;
            try{
            if(list == null)
                list=temp;
            else{
                current = list;
                while(current != null && !found)
                    if(temp.object.getWord().compareTo(current.object.getWord())<0)
                        found = true;
                    else{
                    previous=current;
                    current=current.next;
                temp.next=current;
                if(previous==null)
                    list=temp;
                else
                    previous.next=temp;
                }//end else
            }//end try
            catch (NullPointerException e)
                System.out.println("Catch at line 46");
        }//end add
    /*WordNode.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordNode that contains a Word object of information and a link field that will contain the address of the next WordNode.
    * @author Denis
    public class WordNode {
        Word object;//Word object of information
        WordNode next;//link field that will contain the address of the next WordNode.
        WordNode object2;
        public WordNode (WordNode wrd)
             object2 = wrd;
             next = null;
        WordNode(Word x)
            object = x;
            next = null;
        WordNode list = null;
        //WordNode list = new WordNode("z");
        Word getWord()
            return object;
        WordNode getNode()
            return next;
    import javax.swing.JOptionPane;
    /* Word.java
    * Created on November 4, 2007, 10:39 PM
    * A class Word that holds the name of a word and its meaning.
    * @author Denis
    public class Word {
        private String word = " ";
        /** Creates a new instance of Word with the definition*/
        public Word(String w) {
            word = w;
        String getWord(){
            return word;
    }

    zoemayne wrote:
    java:26: cannot find symbol
    symbol  : method add(java.lang.String)
    location: class Dictionary
    add(toAdd);this is in the dictionary class
    generic messageThat's because there is no add(...) method in your Dictionary class: the add(...) method is in your WordList class.
    To answer your next question "+how do I add things to my list then?+": Well, you need to create an instance of your WordList class and call the add(...) method on that instance.
    Here's an example of instantiating an object and invoking a method on that instance:
    Integer i = new Integer(6); // create an instance of Integer
    System.out.println(i.toString()); // call it's toString() method and display it on the "stdout"

  • Help needed for editable alv grid program

    hi,
    Can you please tell me how to set a ‘update’ button in application toolbar of alv griv without suppressing it and how to write the code for that update button so that if I change my editable column data and press the update button my updated data should be stored in my database table.
    the code what i wrote is:
    TABLES: vbak,vbap.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_final,
    vbeln LIKE vbak-vbeln,
    erdat LIKE vbak-erdat,
    matnr LIKE vbap-matnr,
    posnr LIKE vbap-posnr,
    END OF t_final.
    DATA: i_final TYPE STANDARD TABLE OF t_final INITIAL SIZE 0,
    wa_final TYPE t_final.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    •     Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    fieldcatalog-fieldname = 'VBELN'.
    fieldcatalog-seltext_m = 'sales order'.
    fieldcatalog-col_pos = 0.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'ERDAT'.
    fieldcatalog-seltext_m = 'date'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'material no.'.
    fieldcatalog-col_pos = 2.
    fieldcatalog-edit = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'POSNR'.
    fieldcatalog-seltext_m = 'line item no.'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    •     Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    •     gd_layout-totals_only = 'X'.
    •     gd_layout-f2code = 'DISP'. "Sets fcode for when double
    •     "click(press f2)
    •     gd_layout-zebra = 'X'.
    •     gd_layout-group_change_edit = 'X'.
    •     gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    •     Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    •     i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    •     it_special_groups = gd_tabgroup
    •     IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    •     is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc 0.
    •     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    •     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    •     Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
    INNER JOIN vbap AS b ON avbeln = bvbeln
    INTO TABLE i_final WHERE avbeln = bvbeln.
    •     ENDFORM. " DATA_RETRIEVAL
    thanks in advance.

    hi sudhir,
    thanks for ur reply.
    after seeing the code u send to me i made changes to my program.but still when i click on update button,nothing is happening.can u please suggest me an idea.
    TABLES: vbak,vbap.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_final,
         vbeln LIKE vbak-vbeln,
         erdat LIKE vbak-erdat,
         matnr LIKE vbap-matnr,
         posnr LIKE vbap-posnr,
         END OF t_final.
    DATA: i_final TYPE STANDARD TABLE OF t_final WITH HEADER LINE,
          wa_final TYPE t_final.
    *DATA:i_final LIKE vbap OCCURS 0.
    *DATA:wa_final LIKE vbap.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'VBELN'.
      fieldcatalog-seltext_m   = 'sales order'.
      fieldcatalog-col_pos     = 0.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'ERDAT'.
      fieldcatalog-seltext_m   = 'date'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'material no.'.
      fieldcatalog-col_pos     = 2.
      fieldcatalog-edit        = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'POSNR'.
      fieldcatalog-seltext_m   = 'line item no.'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
                i_callback_pf_status_set = 'GUI_STAT'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               it_events                = it_events
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = i_final
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
      INNER JOIN vbap AS b ON avbeln = bvbeln
      INTO TABLE i_final WHERE avbeln = bvbeln.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM GUI_STAT                                                 *
    -->  RT_EXTAB                                                      *
    FORM gui_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'UPDATE' EXCLUDING rt_extab.
    ENDFORM.
          FORM USER_COMMAND                                             *
    -->  U_COMM                                                        *
    -->  RS_SELFIELD                                                   *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      DATA:selfield TYPE slis_selfield.
      CASE u_comm.
        WHEN 'UPDATE'.
          LOOP AT i_final ."into wa_final.
            i_final-matnr = vbap-matnr.
            update (vbap) from table i_final.
            IF sy-subrc = 0.
              MESSAGE s000(0) WITH 'records updated successfully'.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    ENDFORM.

  • HELP NEeded in creating tis java program

    create a prompter appliation that prompts the user for two numbers. The first number is a minimum value, and the second is a maximum value. Prompter then prompts the user for a number between the minimum and maximum numbers entered. The user should be continuously prompted until a number within the range is entered. Be sure to include the minimum and maximum numbers in prompt.
    use boolean operator in while loop
    what do do??

    so can some 1 help me"Help" as in provide workable code? They might - you did all right in your last
    thread. Personally, though, I doubt you're much helped by this.
    Start by reading the description of what your code must do. Make sure you
    understand the description - perhaps by explaining it in your own words to someone
    else. If they don't understand then you don't understand: not in any sense
    that matters.
    Then proceed to write some code. The first sentence of the description you posted
    makes a good starting point. Write some code that compiles and does this.
    Make sure you understand what each line does before moving on.
    If you get stuck post some code and an actual question. If there is a compiler error,
    copy paste and post the actual error you can't understand and say which line it refers
    to. If your code compiles but has unwanted, unexpected or mysterious results,
    say what it does and what you were expecting, or wanting.
    Hope that helps.
    (My apologies if your native language is not English, but really. Use a
    dictionary - online or, better, in paper form. Eschew abbreviations. Read what you
    post aloud or, as above, to someone else who can tell you if it makes no sense.)

  • Help NEEDED!!! - Quiz Program

    Doing a Java project, writing a Quiz program basically got multiple screens and using a Buffered reader which loads a txt folder, at the moment it reads the questions and allows u to skip questions on all 4 buttons, i know need it to count up the correct answers and have a final score etc.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.StringTokenizer;
    import javax.swing.*;
    public class Main extends JFrame implements ActionListener
         private JButton button, buttonAns1, buttonAns2, buttonAns3, buttonAns4;
         private JPanel panel, panelAns, panelAns1, panelAns2, panelAns3, panelAns4;
         private JLabel labelTitle, labelName, labelQ1;
         BufferedReader inFile;
         boolean start =true;
         String answer = null;
         int noOfQuestions = 0;
         Main myMain ;
         MusicQuiz myMusicQuiz;
         Levels myLevels;
         public Main()
              String name;
         name = JOptionPane.showInputDialog(null,"Please enter your Name!");     
              JOptionPane.showMessageDialog(null,"Welcome " + name);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              Container c= getContentPane();
              setSize(700,600);
              panel = new JPanel();
    panel.setLayout(new GridLayout(5,1));
    panel.setSize(600,400);
              c.add(panel);
              labelTitle = new JLabel("MTV's Quiz Star");
              labelTitle.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelTitle);
              labelTitle.setFont(new Font("Tahoma",Font.BOLD,48));
              labelTitle.setForeground(Color.orange);
              labelName = new JLabel("User: "+ name);
              labelName.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelName);
              labelName.setFont(new Font("Tahoma",Font.BOLD,14));
              labelName.setForeground(Color.darkGray);
              labelQ1 = new JLabel("");
              labelQ1.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelQ1);
              labelQ1.setFont(new Font("Tahoma",Font.BOLD,24));
              labelQ1.setForeground(Color.darkGray);
              panelAns = new JPanel();
              panelAns.setLayout(new GridLayout(2,2));
              panelAns.setSize(600,400);
              panel.add(panelAns);
              buttonAns1 = new JButton("");
              buttonAns1.addActionListener(this);
              buttonAns1.setForeground(Color.darkGray);
              panelAns.add(buttonAns1);
              buttonAns2 = new JButton("");
              buttonAns2.addActionListener(this);
              buttonAns2.setForeground(Color.darkGray);
              panelAns.add(buttonAns2);
              buttonAns3 = new JButton("");
              buttonAns3.addActionListener(this);
              buttonAns3.setForeground(Color.darkGray);
              panelAns.add(buttonAns3);
              buttonAns4 = new JButton("");
              buttonAns4.addActionListener(this);
              buttonAns4.setForeground(Color.darkGray);
              panelAns.add(buttonAns4);
              setSize(600,400);
              show();
              countQuestions();
              readQuestions();
         public static void main(String[] args)
                   Main myMain = new Main();
         public void countQuestions()
              try
                   String line;
                   inFile = new BufferedReader(new FileReader("Questions.txt"));
              try
                   while ((line = inFile.readLine()) != null)
                        noOfQuestions++;
                   inFile.close();
              catch(Exception e)
         catch (FileNotFoundException e)
              System.out.println("File - Questions.txt - File Not Found");
              private void readQuestions()
                   int number = (int)(Math.random() * noOfQuestions);
                   if(start == true)
                   start = false;
              try
                   inFile = new BufferedReader(new FileReader("Questions.txt"));
                   String line = null;
                   for(int loop =0;loop < number;loop++)
                        line= inFile.readLine();
                   StringTokenizer parts = new StringTokenizer(line,"|");
                   labelQ1.setText(parts.nextToken());
                   buttonAns1.setText(parts.nextToken());
                   buttonAns2.setText(parts.nextToken());
                   buttonAns3.setText(parts.nextToken());
                   buttonAns4.setText(parts.nextToken());
                   answer = parts.nextToken();
                   inFile.close();
              catch (Exception e)
              /* (non-Javadoc)
              * @see java.awt.event.ActionListeneractionPerformed(java.awt.event.ActionEvent)
              public void actionPerformed(ActionEvent arg0)
                   if (arg0.getSource()==myMusicQuiz)
                        if(myMusicQuiz==null)
                             myMusicQuiz= new MusicQuiz();
                        else show();
                   if (arg0.getSource()==myLevels)
                        if(myLevels==null)
                             myLevels= new Levels();
                        else show();
                   if(arg0.getSource() == buttonAns1)
                        readQuestions();
                   if(arg0.getSource() == buttonAns2)
                        readQuestions();
                   if(arg0.getSource() == buttonAns3)
                        readQuestions();
                   if(arg0.getSource() ==buttonAns4)
                        readQuestions();
    }

    In case you're wondering if someone is going to do it for you, I'd guess No. So if you're still sitting there on your hands you might want to do something about it instead.

  • Help needed with swings for socket Programming

    Im working on a Project for my MScIT on Distributed Computing...which involves socket programming(UDP)....im working on some algorithms like Token Ring, Message Passing interface, Byzantine, Clock Syncronisation...i hav almost finished working on these algorithms...but now i wanna give a good look to my programs..using swings but im very new to swings...so can anyone help me with some examples involving swings with socket programming...any reference...any help would be appreciated...please help im running out of time..
    thanking u in advance
    anDy

    hi im Anand(AnDY),
    i hav lost my AnDY account..plz reply to this topic keeping me in mind :p

  • Help - need a report writer for printing labels

    Hello,
    I need an inexpensive and easy to use report writer that will allow me to print mailing lables from a JSP web app.
    What is a good report writer?
    Thanks
    Frank

    We've used JasperReports (open source) for this

  • Help needed in running a  java program

    hi
    how to run a java program using another java program.
    i have tried a litte to run the notepad,mspaint applications sucessfully using the Runtime class,but how to specify a java program init . the program is given below
    public class cls
    public static void main(String args[])
      Runtime r=Runtime.getRuntime();
      Process p=null;
      try{
        p=r.exec("notepad" );}
        catch(Exception e) {
        System.out.println("error on execution");
    }to run another java program how to modify the exec() or any other way to do this.

    thank u
    its working without any error but it doesn't print any thing on the screen.
    the program is
    this program to be run by cls.java
                                             // hello.java
    import java.io.*;
    public class hello
    public static void main(String[] args)
        System.out.println("hello world");
      }cls.java is given below
                                                    //cls.java
    public class cls
    public static void main(String args[])
      Runtime r=Runtime.getRuntime();
      Process p=null;
      try{
        p=r.exec("java  hello" );}
        catch(Exception e) {
        System.out.println("error on execution");
    }

  • Help needed in 8i Lite Replication Programming

    Hi:
    I am currently doing a prototype of using Oracle Lite 8i replication service. I am using the Oracle Replication OLE Control (shipped with 8i Lite) in a VB program. I just tried to connect to my local 8i Lite database by using the API, here is the code:
    Private Sub Form_Load()
    Dim Obj As Object
    Set Obj = CreateObject("POLite.Repsvr8")
    Dim rcode As Boolean
    rcode = Obj.StoreConnectionOpen("scott", "tiger", "POLITE")
    End Sub
    And here is the error I got:
    In a message box with a caption of "POLite Replication Server", it says "repcb8.dll -- could not be loaded (126) "
    Can anybody from Oracle community tell me what this message all about? And if you guys have any sample replication VB code, I would appreciate if you guys can share with me.

    Hello,
    we had the same problem as you did and we couldn't find the repcb8.dll file on the installation CD.
    You have to make a copy of your \ORACLE_HOME\BIN\olrep840.dll file.
    (or if you are using an older version olrep835.dll/olrep836.dll). Then you have to RENAME the copy of olrep840.dll to repcb8.dll.
    Perhaps it will now ask for another file. Repeat the same process for this file also (rename a copy of the olrep840.dll to this file).

  • Help needed for MySQL 5 database DSN less connection with Oracle reports

    Hi,
    I am using Oracle Develper Suite and java (J2EE) for my application. I am using MySql 5 as database tool. I want to use Oracle reports of Oracle Develper suite. I have created some reports by first creating system DSN for MySql database and then connect Oracle reports to that DSN by "jdbc:odbc" connection string provided in Oracle Report developer wizard. This is working fine.
    I want to generate reports without creating system DSN (DSN less) so that i can use my application on any computer without creating DSN for Oracle Reports. I am deploying my application on OC4j as "EAR" file.
    Help in this regard will be highly appreciated.
    Regards.

    Using an 8i client, you will need to configure the tnsnames.ora file with appropriate connection information if you are using local naming. If you are using host naming or something like an Oracle Names server to resolve TNS aliases, you can skip the tnsnames.ora configuration. A default installation of the Oracle client, though, will probably be using local naming.
    If the tnsnames.ora file is configured, or you have configured an alternate way of resolving TNS aliases, you should be able to use the connection string
    DRIVER={Oracle ODBC Driver};DBQ=<<TNS alias>>;UID=system;PWD=managerIf you wanted to move to the 10g client (the 10g Instant Client could be useful here), there are some streamlined naming methods that could be used instead of configuring the tnsnames.ora file.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Help needed with printer settings for wired ethernet connection

    I'm hoping someone can help me with a network printing issue. I have a large format color laser printer (Tektronix Phaser) and since moving to OS 10.6 I can't figure out how to configure the printer so that the system sees it. I have a simple wired ethernet network with a couple of Macs and a couple of printers. All devices are connected via a switch. When using earlier OSs I was able to connect to the Phaser using Ethertalk. Obviously this is no longer supported and I can't figure out how to set the printer so the OS can see it. I have lots of options which can be turned on or off and in some cases set up in other ways: Ethertalk, IPX, Netware, TCP/IP, DNS, LPR, HTTP and remote internet printing, I've tried messing with these but the result is always the same--system doesn't see the printer. Currently Ethertalk is on, IPX and Netware are off, TCP/IP is on, DNS and LPR are on, as are AppSocket, HTTP, FTP and remote internet printing. I can change the IP address but no matter what address I've tried I cannot ping the printer. (I'm using a Gutenprint driver for this printer.)
    I don't really know enough about all this to get anywhere and I haven't been able to find help anywhere even from tech friends. Xerox won't help me and neither will Apple. Any help would be appreciated. I can supply more detail on specifics where necessary. Thanks, Bob

    Old Phaser models may becoming more and more difficult to use, but you can give this a try.
    1. Configure the printer via front panel to use TCP/IP and enable DHCP if it's supported. If not then you will need to configure an IP address for the printer together with your local network's mask, and gateway IP address. Except for the first the others will be provided by opening Network preferences to see what those settings are. The printer's IP address needs to be set somewhere within the range of IP addresses your router provides locally.
    2. You need the PPD file required for your printer. If you have the Phaser driver installer you can use it to install the PPD or you can extract the specific PPD from the installer package. This part is tricky because I don't know where you may find the driver now if you don't have the installer. The older installers can be accessed through the Finder by selecting the package then CTRL- or RIGHT-click and select Show Package Contents from the contextual menu. You can then rummage through the package to search for the PPD for your printer. Then navigate to the /Library/Printers/PPD/Contents/Resources/ folder and drop the PPD file inside.
    3. Open Print & Fax preferences and click on Add [+] to add a new printer. Click on the IP icon in the toolbar. Select Line Printer Daemon - LPD from the Protocol drop down menu. Input the IP address you assigned the printer in the Address field. You can file in the optional fields that follow. Then from the Print Using drop down menu locate the listing for your printer and select it.

Maybe you are looking for

  • ITunes 10 Artwork gone

    For some reason, most of my artwork in iTunes 10 is missing completely. It was there before I updated, and now only 1/4 of the previous artwork is still showing. I tried changing the size of the images, extending the bar out, etc. and it's just not t

  • Parent Child Hiearachy not working while applying from prompt

    Hi, I have a requirement to have a prompt on parent-child hiearachy. I am able to create prompt but when we are selecting anything in that prompt then value is not passing in the main report. I mentinoned "override with prompt" in selection steps, bu

  • How do I get back old emails that were lost when I changed my email address?

    I changed email providers. I have the new account set up. I then went to Tools/Account Settings/Account Actions. I then removed the old account (assuming that it would stay in my inbox and just not try to send or receive) and all of the old incoming

  • System refersh PRD to SANDBOX

    Hi all we are planning to system refresh through offline  backup restore from Tape drive.  we don't have downtime so we have to restore backup. for this pls guide me briefly. Thanks YR

  • Having trouble sending new Pages5.0 documents in iMail

    Every time I try to send a Pages5.0 documents via iMail on my computer (it's all updated with the new OS) it send an undeliverable message. It doesn't matter which email address I send it to or from. Does any one else have this problem?