Calling from java buttons in an applet

ok i made this program here and now i'am tryin to call certain certain classes from each button. i can't figure out how to do that.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JDemoGridLayout extends JApplet
JLabel greeting = new JLabel("SAMPLE", JLabel.CENTER);
Font HeadlineFont = new Font("Helvetica",Font.BOLD, 24);
private JButton b1 = new JButton ("Button 1");
private JButton b2 = new JButton ("Button 2");
private JButton b3 = new JButton ("Button 3");
private JButton b4 = new JButton ("Button 4");
private GridLayout layout = new GridLayout(6,6,6,6);
JLabel personalGreeting = new JLabel("");
Container con = getContentPane();
public void init()
  greeting.setFont(HeadlineFont);
personalGreeting.setFont(HeadlineFont);
con.add(greeting);
con.setLayout(new FlowLayout());
setLayout(layout);
add(b1);
add(b2);
add(b3);
add(b4);
}Edited by: javastudent101 on Mar 4, 2009 7:12 AM

javastudent101 wrote:
ok i made this program here and now i'am tryin to call certain certain classes from each button. i can't figure out how to do that.You don't call classes from buttons. What you can do is add a java.awt.event.ActionListener to each button. This ActionListener's actionPerformed() method will get called whenever the button is clicked. An example:
MyActionListener listener = new MyActionListener();
JButton button = new JButton("Do My Taxes");
button.setActionCommand("DoTaxes");
button.addActionListener(listener);
JButton button2 = new JButton("Take a Shower");
button2.setActionCommand("TakeShower");
button2.addActionListener(listener);
private class MyActionListener implements ActionListener {
   public void actionPerformed(ActionEvent e) {
      String command = e.getActionCommand();
      if ("DoTaxes".equals(command)) {
         // Whatever processing is necessary to do taxes
      else if ("TakeShower".equals(command)) {
         // Whatever it takes to take a shower.
}See [How to use Buttons|http://java.sun.com/docs/books/tutorial/uiswing/components/button.html] for more information.
Alternatively, you could use an Action specific to each JButton. Once you understand ActionListeners, it's pretty easy to understand Actions.

Similar Messages

  • Duration of an Abap Function call from Java using Jco3

    Hi guys!
    I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
    greetings, Hannes

    Hi Hannes,
    I think you have already got the answer to your question - the network set-up you have is probably the bottleneck.  Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
    Does your RFC contain any complex logic or business processes?  Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export.  Do you have any scope for testing with your Java tool on the same network as the SAP system?
    Cheers,
    G.

  • Dll call from java using Jbuilder?

    Please?
    Does anyone know how I do dll calls from java (jubuilder).
    I have tried but did not manage to get it wright???
    / thanks carlos

    Research JNI (java native interface)

  • How can i measure BAPI runtime which has called from JAVA

    Hi abapers
    how can i get run time for BAPI called from JAVA through JCO.
    i know that i can use SE30 from ABAP by executing from SAP.
    may be ST05 useful for me i did it but when display trace
    i am getting big list by seeing this list i am not able to find the runtime for that BAPI.
    please any one can explain
    reagdrs
    ramesh

    Hi Ramesh,
       Irrespective of whether the call is from an external system or within sap, the bapi will be executed in R/3 only.
    So, you can safely measure the runtime using se30 only.
    If it is taking more time when called from JCo , then you can be sure that the problem is not with SAP and is actually due to the JCo connectivity with R/3.
    Regards,
    Ravi

  • Web Service call from java UDF in message mapping

    Hi,
           Is it possible to call a web service from inside a java UDF in message mapping? The webservice can be any standard one. If this is possible please let me know how this can be done.
    Regards,
    Shiladitya

    Hi Shila,
                 Hope u remember me
    Here is the standard code used to call webservice from Java UDF
    public String setSoapAction(String SOAPAction,Container container){
    try{
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey soapurl = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/SOAP" , "THeaderSOAPACTION");
    conf.put(soapurl, SOAPAction);
    return "";
    }catch(Exception e){
    e.getMessage();
    return "";
    Regards,
    Arijit

  • RFC call from java webdynpro

    Hi,
    I'm creating a Java Webdynpro where I call RFC's from SAP.
    For the images in the webdynpro, I call the standard SAP function 'CVAPI_DOC_VIEW'
    When I execute the function in SAP, I get the url to the contentserver with the correct image.
    After calling the same function in my Java Webdynpro, the url is empty.
    I've checked the importing parameters after calling from webdynpro and SAP and they are the same.
    After debugging, I saw that the function 'CVAPI_DOC_VIEW' is the problem. He's exporting an empty url after calling from the webdynpro.
    Does anybody knows the possible fault and solution for my problem?

    I'm not an ABAPer but the last time I've dealt with DMS from Web Dynpro an ABAPer wrote a custom function that gets the file content (XSTRING) by sending DMS parameters (documenttype, documentnumber, documentversion, documentpart).
    After getting the XSTRING from my Web Dynpro Java, I convert it to byte[] and created URL by using WDResourceFactory.
    Hope it helps...
    Omri

  • How stored procedure get executed when called from java

    When we create a stored procedure or function in oracle, it is compiled and stored there. From java when we call them no compilation is performed its a simple call. When a function or stored procedure is invoked from multiple instance of java objects(for a single session), does the stored procedure clone it self so that it can be called by different java objects which I think not possible at all. In such cases when one java object is interacting with the stored procedure, does other java objects go on a wait state. What happens if sessions are different.
    Please help.

    >
    does oracle creates multiple instance of a particular stored procedure for different sessions or connections. if not then there might be some kind of waiting principle followed.. what happens exactly
    >
    What happens exactly is detailed in Chap. 14 Memory Architecture ni the Database concepts doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10713/memory.htm#i21266
    The code is shared but the data isn't (see the lone exception to this below).
    See the section on the Library Cache
    >
    Program Units and the Library Cache
    The library cache holds executable forms of PL/SQL programs and Java classes. These items are collectively referred to as program units.
    The database processes program units similarly to SQL statements. For example, the database allocates a shared area to hold the parsed, compiled form of a PL/SQL program. The database allocates a private area to hold values specific to the session that runs the program, including local, global, and package variables, and buffers for executing SQL. If multiple users run the same program, then each user maintains a separate copy of his or her private SQL area, which holds session-specific values, and accesses a single shared SQL area.
    >
    The exception is when code uses the SERIALLY_REUSABLE pragma. In that case the memory for package state is in the SGA and users do not have their own copy in their UGA.
    See the SERIALLY_REUSABLE pragma in the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/seriallyreusable_pragma.htm
    >
    The global memory for serially reusable packages is pooled in the System Global Area (SGA), not allocated to individual users in the User Global Area (UGA). That way, the package work area can be reused. When the call to the server ends, the memory is returned to the pool. Each time the package is reused, its public variables are initialized to their default values or to NULL.
    Serially reusable packages cannot be accessed from database triggers or other PL/SQL subprograms that are called from SQL statements. If you try, the database generates an error.

  • Passing UDT TABLE of VARCHAR as an Input parameter in Stored procedure call from java

    I have following Type defined at the schema: ident_arr IS TABLE OF VARCHAR2(100) which is type of one of the input parameters. I am able to create oracle.sql.ARRAY object to map it with this UDT before calling my stored procedure from java. When I execute my stored procedure, I get the following error:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'P_PV_WCC_INSERT'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    I have already checked all other parameter types.

    Hello,
    Thank you, guys, for advice. I should have explained calling context before, but what I basically need to do is to see if procedure(arg1, list(record(arg2, arg3))) returns true.
    I see array binding wouldn't fit there nicely. Internal procedure calls would be proc(next(arg1), next(arg2), next(arg3)) - if all these return true, external call should also return true. I would need to make a list of repeating values of arg1 and separate list(record(arg2, arg3)) into separate lists. I would also need to record whether the internal call returns true to deduce whether external call returns true.
    As I see no better way yet, I'll make Oracle procedure proc(arg1, arg2, arg3) and implement a loop in .NET side. If I optimize for performance, I'll probably pack the array of records into string and pass it for Oracle side to parse.
    Regards,
    Aurimas Pranskevicius

  • JavaFX hangs when called from Java

    Hello
    I am developing a java application with a JavaFX gui, the communication from Java works with an java interface. The communication works,but after a few updates the javaFX code hangs and subsequently the Java code also hangs.
    Is this a common problem, and so is there a common solution for this.

    JavaFX UI calls need to be done on the Event Thread. So if your Java Application has multiple threads or runs on a different Thread to need to wrap all callbacks to JavaFX in a deferAction like this:
    class YourFXClass extends YourJavaInterface {
       override public function someMethod(someArgument) {
            FX.deferAction(function() : Void {
                  // doSomething with someArgument
        }

  • ESB Webservice call from Java client

    Hi,
    i need to call webservice from Java client which inturn will call ESB
    I tried creating proxy from the WSDL in jDeveloper and tried setting the following end points
    My concrete WSDL path :http://10.237.25.63:8889/esb/wsil/SubroCaseESBSystem/InputRouter?wsdl
    My EM -path:"http://10.237.25.63:8889/event/subrotest/SubroInputrouter"
    When i call the concreteWSDL im getting
    "HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 405 Method Not Allowed"
    If i call the EM pathim getting
    "javax.xml.rpc.soap.SOAPFaultException"
    Any guess as how i need to call my ESB from client.

    Hello Venkat,
    - I have created Java Proxy using Jdeveloper for ESB webservice and I usually use http://host:port/event/...?wsdl, and it creates stub which works without any modification. Let me know, may be I can try sending sample project
    - I would like to verify if you are having issue with Java client or ESB itself, are you able to execute that ESB process/service from EM test page or from any other BPEL process?
    Regards,
    Chintan

  • Call from Java Plsql Procedure with VArray as Out Parameter

    Hi,
    I have a Java web application(Tomcat server) that call a plsql procedure with Varray as OUT parameter.
    The Plsql code is perfectly compiled.
    When i run the application, I get the following error msg in my Tomcat window:
    java.sql.SQLException: ORA-06530: Reference to uninitialized composite
    ORA-06512: at "SEMS1.PACK_SEMSADMIN_OFFEREDJOBS", line 102
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
    3)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    {color:#0000ff}
    Doubt: Do I need to declare ArrayDescriptors to retrieve the VArray from the Plsql procedure.
    I think the below statement is enough; we need ArrayDescriptors only when we we wish to send a Plsql Object or Varray from Java code to the procedure. Plz correct me if not so.
    dbCallableStatement.execute();
    ARRAY SimpleOUTArray = (ARRAY) ((OracleCallableStatement) dbCallableStatement).
    getObject(Integer.parseInt(arlParameterOutIndex.get(i).toString()));{color}
    I am unable to realize where the mistake is?
    {color:#800000}
    {color}{color:#800000}
    VARRAY AND PROC DETAILS:
    TYPE STRUCT_JOB_DETAILS AS OBJECT
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32 Byte),
    S_MI VARCHAR2 (32 Byte),
    S_LNAME VARCHAR2 (32 Byte),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100 Byte),
    S_UCID VARCHAR2 (8 Byte)
    TYPE VARRAY_JOB_DETAILS IS VARRAY(100) OF STRUCT_JOB_DETAILS;{color}
    {color:#800000}PROCEDURE:{color}
    {color:#800000}CREATE OR REPLACE PACKAGE PACK_SEMSADMIN_OFFEREDJOBS
    AS
    TYPE Generic_Cursor_Type IS REF CURSOR;
    --TYPE varray_job_detail is VARRAY(100) OF STRUCT_JOB_DETAILS;
    --va_varray_job_detail varray_job_detail := varray_job_detail();
    va_varray_job_detail VARRAY_JOB_DETAILS := VARRAY_JOB_DETAILS();
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    CREATE OR REPLACE PACKAGE BODY PACK_SEMSADMIN_OFFEREDJOBS
    AS
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    AS
    vc_query VARCHAR2(15000) := '';
    vc_query_1 VARCHAR2(15000) := '';
    counter NUMBER := 1;
    vc_no NUMBER := 0;
    or_applicants_list Generic_Cursor_Type;
    TYPE type_appln_list IS RECORD
    job_no NUMBER(10),
    job_title VARCHAR2(50 BYTE),
    account_no VARCHAR2(10 BYTE),
    head_fname VARCHAR2(32 BYTE),
    head_minitial VARCHAR2(10 BYTE),
    head_lname VARCHAR2(32 BYTE),
    num NUMBER
    vn_appln_list type_appln_list;
    TYPE type_job_offered IS RECORD
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32),
    S_MI VARCHAR2 (32),
    S_LNAME VARCHAR2 (32),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100),
    S_UCID VARCHAR2 (8)
    vn_job_offered type_job_offered;
    BEGIN
    vc_query := vc_query || ' SELECT jobs.job_no,job_title, account_no, head_fname, head_minitial, head_lname, num';
    vc_query := vc_query || ' FROM jobs, ( ' ;
    vc_query := vc_query || ' SELECT jobs.job_no,count(*) as num' ;
    vc_query := vc_query || ' FROM student_apps ,jobs ' ;
    vc_query := vc_query || ' WHERE jobs.job_no = student_apps.job_no' ;
    vc_query := vc_query || ' AND (student_apps.status in (''o'',''t'')) '; --|| ic_status || ')' ;
    vc_query := vc_query || ' AND jobs.status not in (''z'', ''Z'')' ;
    vc_query := vc_query || ' GROUP BY jobs.job_no' ;
    vc_query := vc_query || ' ) no_apps_off' ;
    vc_query := vc_query || ' WHERE jobs.job_no = no_apps_off.job_no' ;
    dbms_output.put_line('Executed Query_1');
    va_varray_job_detail := VARRAY_JOB_DETAILS();
    va_varray_job_detail.extend(100);
    OPEN or_offered_jobs FOR vc_query;
    LOOP
    FETCH or_offered_jobs INTO vn_appln_list;
    EXIT WHEN or_offered_jobs%NOTFOUND;
    vc_query_1 := '';
    vc_query_1 := vc_query_1 || ' SELECT stud_apps.appl_no APPL_NO, stud_apps.s_fname S_FNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.s_mi S_MI, stud_apps.s_lname S_LNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.appl_date APPL_DATE, look_up.description DESCRIPTION, ' ;
    vc_query_1 := vc_query_1 || ' stud_apps.s_ucid S_UCID ' ;
    vc_query_1 := vc_query_1 || ' FROM student_apps stud_apps,jobs jbs,lookup look_up' ;
    vc_query_1 := vc_query_1 || ' WHERE stud_apps.status in (''o'',''t'') '; --(' || ic_status || ') ' ;
    vc_query_1 := vc_query_1 || ' AND jbs.job_no = stud_apps.job_no' ;
    vc_query_1 := vc_query_1 || ' AND jbs.status not in (''z '', ''Z'')' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.status = look_up.code ' ;
    vc_query_1 := vc_query_1 || ' AND look_up.type = ''st''' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.job_no = ''' || vn_appln_list.job_no || ''' ' ;
    vc_query_1 := vc_query_1 || ' ORDER BY appl_date' ;
    dbms_output.put_line('Executed Query_2');
    OPEN or_applicants_list FOR vc_query_1;
    LOOP
    FETCH or_applicants_list INTO vn_job_offered;
    EXIT WHEN or_applicants_list%NOTFOUND;
    va_varray_job_detail(counter).APPL_NO := vn_job_offered.APPL_NO;
    va_varray_job_detail(counter).S_FNAME := vn_job_offered.S_FNAME;
    va_varray_job_detail(counter).S_MI := vn_job_offered.S_MI;
    va_varray_job_detail(counter).S_LNAME := vn_job_offered.S_LNAME;
    va_varray_job_detail(counter).APPL_DATE := vn_job_offered.APPL_DATE;
    va_varray_job_detail(counter).DESCRIPTION := vn_job_offered.DESCRIPTION;
    va_varray_job_detail(counter).S_UCID := vn_job_offered.S_UCID;
    counter := counter + 1;
    END LOOP; --end of FOR
    CLOSE or_applicants_list;
    END LOOP; -- end of FETCH
    END Admin_Jobs_Offered_Rtr;
    END PACK_SEMSADMIN_OFFEREDJOBS;
    /{color}
    Reqire help plzzzz !!!
    Thanks.

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • How a *.exe called from Java

    hi, everybody
    my question is very short:
    how a *.exe can be called in Java? For example when user clicks a button, the *.exe specified by me must be called. Someone said me that in "System" library there is a "process" package which supports this, but i can not find it!
    if anybody help me, i will be very happy. Because i must finish my project up to this Monday.
    Yours sincerely,
    Eray Hangul
    http://erromerro.ero.tr.tc

    Look at static method of Runtime.getRuntime(); That will return to you a Runtime object.
    Next look at the methods in Runtime named 'exec'.
    For example:
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    Michael

  • Create Opportunity Header api calling from java

    Hi,
    I need to call the Create Opportunity Header api from java but from looking at the spec this is going to be impossible without wrapping the API in some more PLSQL so that it is exposed using SQL types rather than PLSQL types which are not supported in JDBC.
    Is this correct? Are there other approaches which you can suggest.
    Peter.

    See this
    http://forum.java.sun.com/thread.jsp?forum=52&thread=94146

  • Spring/Hibernate tier called from Java Stored Procedure

    Here is my scenario.
    Building out a new physical model alongside an old db.
    Two schema's inside same Oracle instance.
    We are building a new Java tier on top of the new schema using spring/hibernate.
    To maintain sync with the old db we are building a load of PLSQL code that will be called by PLSQL stored procs on the old schema.
    ====
    Now it occurred to me that if I could put a copy of my new java tier in the database itself then the trigger code on the old schema could call a java stored proc wrapper which in turn called into my new java tier inside the instance.
    This way I avoid duplication business logic in the db sync and the java middle tier. Basically I do away with the PLSQL sync code and just use the new java component.
    This clearly has advantages from an automated testing point of view too.
    So very interested in how/if anyone has made this work.
    Potential issues...
    - JVM version (outside the db we use Sun Java 5 - inside the db I'm not sure what is used).
    - How would spring access it's config files?

    user563578,
    You asked:
    interested in how/if anyone has made this workNot me.
    You also asked:
    Potential issues...
    - JVM version (outside db use Sun Java 5 - inside db not sure)
    - How would spring access it's config files?
    Oracle has its own JVM embedded in the database: OJVM
    In Oracle 8i it is compatible with JDK 1.2
    In Oracle 9i it is comaptible with JDK 1.3
    In Oracle 10g it is compatible with JDK 1.4
    You can access files outside of the database from OJVM, you just need to set correct permissions.
    Perhaps Kuassi Mensah's book, Oracle Database Programming Using Java and Web Services will be of help?
    Good Luck,
    Avi.

  • Strange problem with procedure calling from Java!!!

    I am using Oracle 8.1.7 Database, Oracle 8i Application server and WInNT platform.
    I am facing a strange problem while inserting a String from Java to Oracle database through Procedure. When i am passing the String containing single quotes(e.g "test' and ' and ' end") and without including any escape charactes for the single quotes I am passing the String by the setString() method then the procedure is inserting the single quotes without any problem.
    Of course when I am independently executing the procedure thru backend and passing the same String containing single quotes then the error message comes as " quoted string not properly terminated" which is justified,
    I have even printed the String in a file through sql on the runtime of the procedure when it is called by Java and then also the String contatins single quotes that is passed through java without any escape characters. This means that procedure is inserting the String into the column without any hassles!!!!!
    Can anyone tell me what may be the reason for the peculiar behaviour of Database?
    Thanks

    Sri Ram wrote:
    No actually in the documentation of oracle database 10g plsql user guide, oracle explains the concept of declaring nested plsql subprograms he gave the example but in the main block he gave NULL, without calling any procedure.Can you provide a link to where in the Oracle documentation you saw this example?
    in order to know which procedure is getting first i added a dbms statement in both the functions and called the function from the main block.
    the original example was
    DECLARE
    PROCEDURE proc1(number1 NUMBER); -- forward declaration
    PROCEDURE proc2(number2 NUMBER) IS
    BEGIN
    proc1(number2); -- calls proc1
    END;
    PROCEDURE proc1(number1 NUMBER) IS
    BEGIN
    proc2 (number1); -- calls proc2
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------------------------------The original example is equivalent to:
    BEGIN
       NULL;
    END;That is, the main block never calls anything. Either you are misinterpreting the Oracle documentation, or if the example came from a non-Oracle source as I suspect, the author of that example has a deeply flawed understanding of how programming works.
    John

Maybe you are looking for

  • ICal dock icon wont update in Leopard

    My iCal dock icon has stopped updating the current date. I have dragged the icon off the dock and re-dragged a fresh version from the iCal application but this only works for the current day where again it will not update the next day. I have had Leo

  • How to pass Table name as parameter

    For example, you have several tables (TableA, TableB, TableC...TableN) that have the same structure. Ex. CREATE TABLE TableA( id VARCHAR(5), name VARCHAR(20) CREATE TABLE TableB( id VARCHAR(5), name VARCHAR(20) And you want to create a stored procedu

  • How to include a C++ module in an existing C application ?

    I'm working on an existing C application, roughly 70,000 lines, using Visual Studio 2010. I would like to include a C++ class into this; how do I do this?? I tried just adding my C++ source file to the project, not even accessing the class yet, and I

  • Appliance purchase/delivery nightmare

      I was shopping for appliances and comparison shopping.  A salesperson approached us and we were given a printed quote for the appliances we wanted.  We said we were out comparison shopping and would come back if we found this to be the best we coul

  • Was charged for premium account all of a sudden

    I just got an email saying I was charged $10 for premium. I did no such thing... How do I get a refund and cancel this? Solved! Go to Solution.