Writing most code in RDBMS

I have few queries regarding the use of Stored Procedures, Functions
and Triggers in an RDBMS.
(1) When to use Stored Procedure? Writing an INSERT query in a Stored
Procedure is better or firing it from the application level?
(2) Can a Trigger call a Stored Procedure?
(3) What type of code must reside in application and what type in
RDBMS?
(4) Is it faster to work at application level or at the database level?

1) An insert statement is an insert statement, won't be faster from one place or the other. See bottom..
2) Yes, a trigger can call a stored procedure or package or function..
3) "Must" reside? This is a BIG question, and there's not a perfect answer. See bottom..
4) If the work can be done at the database level, it's usually faster to do it there. Lots of reasons PL/SQL is great, but the lack of network lag induced by data movement back and forth to an application usually gives PL/SQL a large lead in application performance.
How to design an application, and when to use application code versus database calls to PL/SQL is a large design issue. Do you have (and plan to keep) the trained manpower to enhance and maintain a PL/SQL environment? Lots of places have investment iin Java programmers, or ASP, or python/perl/C++/etc. and don't want to switch.
And do you want to tie yourself to one product. PL/SQL is Oracle ONLY.. no migrating to another database if a client demands it. Not important if you are doing it for an internal app, but hugely important if you produce software to sell.
And, last, is PL/SQL the right choice for your application? I've written a lot of PL/SQL with great success, but I've also written lots of C/C++ code, Perl, Java, 4th party products, etc. because those languages fulfilled our application and environment needs. To make a good design, you need an experienced application architect or at least analyst to help you.
Now, in general.. here's my two bits. If you have a lot of data manipulation that needs done, or if you want to create standardized data interfaces to keep SQL out of your app, put all of your DML into PL/SQL packages. For the first point, doing the work in the database is very often more efficient than moving the data back and forth to the application to manipulate it. And for the second point, we've reduced application maintenance by a tremendous amount by putting all SQL into PL/SQL packages/functions/procedures (easier to recompile a package than to recompile and redistribute new binaries).
Good book to get and read would be Tom Kyte's book, "Effective Oracle by Design".
Good luck!

Similar Messages

  • Writing web code on a Mac???? And FTP Programs?

    Alright, so bear with me on this one. I've been using mac's for years for my graphic design and graphic pieces of my web sites, but I still use my PC to write the code (HTML, JavaScript, CSS, mostly) that the sites run on. I write it, in true old-fashioned sense, in Notepad.
    However, now my overglorified word processor (PC) is being totally, ridiculously, slow and acting weird... I think it did this before my last Blue Screen of Death, so luckily I've backed up everything important. Anyway, I thought I'd give writing code on the Mac (a gorgeous 20" imac, in all its wondrous glory) a shot. Here's what I've done:
    - Open TextEdit, type in a few lines of test code.
    - Save As : select HTML as the file type, with a file name of "Test" or something.
    - Open the file in Safari, expecting to see a real, webpage. Instead? I see my code. Black text, white background, flaunting every little
    and tag like a defiant child smearing raspberry jam all over my couch.
    I just can't switch to a WYSIWYG editor and lose the (tyrannical) control I've had over my web pages from writing the code in notepad. So what should I be doing to write code on a mac? I need to know soon, since my PC will be exploding any day now. Any help would be GREATLY appreciated.
    P.S. I'd prefer not to have to spend any money to purchase a text editor for web code. Am I being cheap? I don't really know. But if I can use a program that's already on my mac, I'm all for it.
    P.P.S. Also, I've been uploading code/images/etc. to my hosts via the WinSCP FTP software, on a PC. Can anyone recommend good FTP software for OSX (10.4.10).

    Both of iFelix's suggestions are great free apps and I would recommend them also.
    If you don't mind shelling out some money for the apps (after a trial of course), I myself use Panic's Coda (http://www.panic.com/coda/) for coding. A lot of people also prefer apps like TextMate (http://macromates.com/).
    CSSEdit (http://macrabbit.com/cssedit/) is a really nice combination of a WYSIWYG and source editior strictly for CSS also (Coda has this sort of functionality built in also).
    As far as FTP, if you arent happy with the free options, Panic makes an app called Transmit (http://www.panic.com/transmit/) that is excellent, and is also basically built into Coda.
    Message was edited by: shadeDream

  • To avoid writing database code in the front end

    Hello,
    I am working on a database application using 10g database as backend and dotnet as front end. I wish to execute only oracle stored procedure for all the select (to avoid hard parse and use of bind variable), DDL and DML operations; just to avoid writing database code in the front end. Can anyone please give me a little examples of :
    1.Select query's output to be return as resultset by stored procedure.
    2.DML example by stored procedure.
    3.Any DDL example by stored procedure.
    using scott.emp, so that i would just call the stored procedure, rather than giving select,DML and/or DDL commands in the front end. Even though i have read in the documentation, but a clear cut examples will help me to get into clear concept as well.
    Thanks & Regards
    Girish Sharma

    Hi...
    -->Select example
    create or replace procedure get_emp(rc out sys_refcursor)
    is
    begin
    open rc for select * from emp;
    end;
    -->DML example
    create or replace procedure do_dml_emp(pempid in number,
    pempname varchar2,
    result out number)
    is
    begin
    insert into emp(empid,empname) values(pempid,pempname) returning empid into result;
    exception
    when others then
    result:=-1;
    end;
    -->DDL example
    create or replace procedure ddl_emp(colname varchar2,
    coltype varchar2,
    result out number)
    is
    begin
    result:=-1;
    execute immediate 'alter table emp add column ' || colname || ' ' || coltype ;
    result:=1;
    end;

  • Writing java code in JSP

    Hi All
    I dont know which one of the following is more effective in JSP
    writing java code like <% out.println("Hellooo "); %>
    OR
    writing like <%="hello" %>
    I shall be very much thankful to all those who spare their valuable time to clarify my doubt. I hope my question is not a stupid one.
    Thanks
    Elisha

    when both gives the same out put, why there are two for the same out put?Because it is easier to do this:
    Hello <%= userName %>
    than this:
    Hello <% out.println("userName"); %>
    Also there is a BIG difference in readability and maintainability of the JSP page. JSP pages are all about having html, and a few "fill in the blank" spots. The less <% scriptlet code %> you put on your JSP page, the better. If you want to run java code, do it in a servlet/bean.
    With the advent of JSTL, scriptlet code in JSPs should be a thing of the past.

  • Urgent : Doubt in writing a code in start routine

    Hi all ,
                 I am BI 7.0 system , I have doubt in writing a code in start routine .
    1) i have to extract the data first from a custom table based on one condition and then placing it into internal table .
    2) Now i have to loop at source_package for a particular region field say "ASIA". with this result i have to check for the correponding entries in custoom table .
       if condition is not true (i.e ) with entries or not matching then delete that particular record from source_package.
    i have written a small logic for this . but this is producing any ouput , Please check it and also let me know for modifications .
    thanks in advance.
    select * from zcsp
        into corresponding fields of TABLE itab_T
        where
        ZBUSINESSUNIT = 'BC'.
    loop at SOURCE_PACKAGE into ls_SOURCE_PACKAGE where /BIC/DPREGION = 'XE'.
                 loop at itab_t into itab_w where zcategory =
                   ls_source_package-/BIC/DPMAT/BIC/DPCAT.
                       if sy-subrc ne 0.
                         delete SOURCE_PACKAGE.
                       endif.
               endloop.
           endloop.

    You're deleting the entire input package.  You only want to delete the one row.
    DATA: g_tabix TYPE sy-tabix.
    SELECT * FROM zscp
    INTO CORRESPONDING FIELDS OF TABLE itab_t
    WHERE zbusinessunit = 'BC'.
    SORT itab_t BY zcategory.
    LOOP AT source_package INTO ls_source_package WHERE /bic/dpregion = 'XE'.
      g_tabix = sy-tabix.
      READ TABLE itab_t WITH KEY zcategory = ls_source_package-/bic/dpmat/bic/dpcat TRANSPORTING NO FIELDS BINARY SEARCH.
      IF sy-subrc NE 0.
        DELETE source_package INDEX g_tabix.
      ENDIF.
    ENDLOOP.

  • "Attempt to open locked file for writing, Result Code = -54" when importing

    I get this error box when importing audio files into a logic session over my network.
    +Attempt to open locked file for writing+
    +Result Code = -54+
    The finder is capable of copying the files over to the local machine, at which point I can successfully import them into my local logic session, but Logic is incapable of doing the same. Strange and annoying.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • Finished writing amazing code that compiles but won't run properly

    I finished writing this code for someone and it compiles but it does not run properly. Anyone see any problems? Any help would be gladly appreciated.
    /* Program is for the Coconut Grove Palace Building. This program keeps track of the building occupants and the maintenance for each tenant using a simple menu system. */
    import java.util.Scanner;
    public class Grove {
    private static Scanner keyboard = new Scanner(System.in);
    /* Declaring values that will not change throughout the program. The plus one is so that people don't get confused */
    private static final int TOTAL_BUILDING_MAX = 16 + 1;
    private static final int TOTAL_FLOOR_MAX = 8 + 1;
    private static final int APARTMENT_MAX = 4 + 1;
    public static void main (String[] args) {
    // Declare main variable
         int cocoPalace[][] = new int[2][3];
         char menuChoice;
         int aptNumber = 0;
         int floorNumber = 0;
         int totalFloor = 0;
         int totalBuilding = 0;
    //Fill up the array with the original amount of 2 people per apartment
         for (int dex = 0; dex <3; dex++)
                   cocoPalace[0][dex] = 2;
                   cocoPalace[1][dex] = 2;     
         System.out.println("Welcome to the coconut grove palace");
    //Main part of the program that is essentially the menu screen.     
         do
              //method that calculates the maintenance that will be used several times
              double buildingMaintenance = calculateMaintenance(cocoPalace);
              //Menu System using a switch command with nested for loops and other code.
                   System.out.println("(A)partment, (B)uilding, (P)eople, E(x)it");
                   menuChoice = keyboard.nextLine().charAt(0);
                        switch (menuChoice)     
    //FIRST CASE 'A' ASK FOR THE FLOOR AND APARTMENT NUMBER AND DISPLAYS THE MAINTENANCE COST FOR IT
                   case 'a':
                   //Idiot proof 1
                   System.out.println("Please enter floor number :");
                   floorNumber = keyboard.nextInt();
                   while (floorNumber > 2)
                   System.out.println("Floor number must be between 1 and 2. Try again:");
                   floorNumber = keyboard.nextInt();
                   //Idiot proof 2               
                   System.out.println("Please enter apartmentNumber :");
                   aptNumber = keyboard.nextInt();
                   while (aptNumber > 3)
                   System.out.println("Apartment number must be between 1 and 3. Try again:");
                   aptNumber = keyboard.nextInt();
                   System.out.println("Floor number" + cocoPalace[floorNumber] + "Apartment number" + cocoPalace[floorNumber][aptNumber] + " : " + buildingMaintenance);
                   break;
    //SECOND CASE 'B' REPORTS THE OCCUPANCY AND MAINTENANCE FOR THE WHOLE BUILDING
                   case 'b':
                   for (int dex2 = 0; dex2 < 3; dex2++)
                   System.out.println("Floor number 1 Apartment number " + cocoPalace[0][dex2] + " : " + buildingMaintenance);                    
                   for (int dex3 = 0; dex3 < 2; dex3++)
                   System.out.println("Floor number 2 Apartment number " + cocoPalace[1][dex3] + " : " + buildingMaintenance);                    
                   break;
    /*THIRD CASE 'P' ALLOWS THE USER TO CHANGE THE AMOUNT OF PEOPLE IN AN APARTMENT AND RECALCULATES THE MAINTENACE. IT IS ALSO "IDIOT PROOFED" SO THAT VALUES DO NOT EXCEED THE REGULATIONS OF THE BUILDING IT SELF */
                   case 'p':
                   //Idiot proof 1
                   System.out.println("Please enter floor number : ");
                   floorNumber = keyboard.nextInt();
                   while (floorNumber > 3)
                   System.out.println("Floor number must be between 1 and 2. Try again: ");
                   floorNumber = keyboard.nextInt();
                   //Idiot proof 2               
                   System.out.println("Please enter apartment number : ");
                   aptNumber = keyboard.nextInt();
                   while (aptNumber > 4)
                   System.out.println("Apartment number must be between 1 and 3. Try again: ");
                   aptNumber = keyboard.nextInt();
                   //Idiot proof 3 with the amount of people being added at the same time.
                   System.out.println("How many people will there be : ");
                   int amountPeople = keyboard.nextInt();
                   cocoPalace[floorNumber][aptNumber] = amountPeople;
                   while (amountPeople > APARTMENT_MAX || totalBuilding > TOTAL_BUILDING_MAX || totalFloor > TOTAL_FLOOR_MAX )
              System.out.print("Too many people in building. Please try again : ");
                   amountPeople = keyboard.nextInt();
                        cocoPalace[floorNumber][aptNumber] = amountPeople;
                   break;
         while (menuChoice != 'x'|| menuChoice != 'a' || menuChoice != 'p' || menuChoice != 'b');
    //Method to calculate maintenance.
    private static double calculateMaintenance(int cocoPalace[][])
         int amountPeople = 0;
         for (int dex4 = 0; dex4 < 2; dex4++)
                   amountPeople += cocoPalace[0][dex4];
                   amountPeople += cocoPalace[1][dex4];
                   cocoPalace[0][dex4] = 2;
                   cocoPalace[1][dex4] = 2;     
              double buildingMaintenance = 5000/(amountPeople);
         return(buildingMaintenance);
    }

    ok the array problem is fixed i was having a simple "one off" mistake when accessing the array.
    As for the error that i keep getting. I honestly can't see where the problem with this is in code.
    The it cant be equalt to nothing because this is written so that it has to equal a letter before the program actually runs through everything. Thanks again for the help
    here is the error that i am getting when the program runs.
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:558)
    at Grove.main(Grove.java:46)
    Here is the code with the new corrections.
    /* Program is for the Coconut Grove Palace Building. This program keeps track of the building occupants and the maintenance for each tenant using a simple menu system. */
    import java.util.Scanner;
    public class Grove {
    private static Scanner keyboard = new Scanner(System.in);
    /* Declaring values that will not change throughout the program. The plus one is so that people don't get confused */
    private static final int TOTAL_BUILDING_MAX = 16 + 1;
    private static final int TOTAL_FLOOR_MAX = 8 + 1;
    private static final int APARTMENT_MAX = 4 + 1;
    public static void main (String[] args) {
    // Declare main variable
         int cocoPalace[][] = new int[2][3];
         char menuChoice;
         int totalFloor = 0;
         int totalBuilding = 0;
    //Fill up the array with the original amount of 2 people per apartment
         for (int dex = 0; dex <3; dex++)
                   cocoPalace[0][dex] = 2;
                   cocoPalace[1][dex] = 2;     
         System.out.println("Welcome to the coconut grove palace");
    //Main part of the program that is essentially the menu screen.     
         do
         //Variables intialized
         int aptNumber = 0;
         int floorNumber = 0;
              //method that calculates the maintenance that will be used several times
              double buildingMaintenance = calculateMaintenance(cocoPalace);
              //Menu System using a switch command with nested for loops and other code.
                   System.out.println("(A)partment, (B)uilding, (P)eople, E(x)it");
                   menuChoice = keyboard.nextLine().charAt(0);
                        switch (menuChoice)     
    //FIRST CASE 'A' ASK FOR THE FLOOR AND APARTMENT NUMBER AND DISPLAYS THE MAINTENANCE COST FOR IT
                   case 'a':
                   //Idiot proof 1
                   System.out.println("Please enter floor number     :");
                   floorNumber = keyboard.nextInt();
                   while (floorNumber > 2)
                   System.out.println("Floor number must be between 1 and 2. Try again:");
                   floorNumber = keyboard.nextInt();
                   //Idiot proof 2               
                   System.out.println("Please enter apartmentNumber  :");
                   aptNumber = keyboard.nextInt();
                   while (aptNumber > 3)
                   System.out.println("Apartment number must be between 1 and 3. Try again:");
                   aptNumber = keyboard.nextInt();
                   System.out.println("Floor number" + cocoPalace[floorNumber] + "Apartment number" + cocoPalace[floorNumber - 1][aptNumber - 1] + "  :  " + buildingMaintenance);
                   break;
    //SECOND CASE 'B' REPORTS THE OCCUPANCY AND MAINTENANCE FOR THE WHOLE BUILDING
                   case 'b':
                   for (int dex2 = 0; dex2 < 3; dex2++)
                   System.out.println("Floor number 1 Apartment number  " + cocoPalace[0][dex2] + "  :  " + buildingMaintenance);                    
                   for (int dex3 = 0; dex3 < 2; dex3++)
                   System.out.println("Floor number 2 Apartment number  " + cocoPalace[1][dex3] + "  :  " + buildingMaintenance);                    
                   break;
    /*THIRD CASE 'P' ALLOWS THE USER TO CHANGE THE AMOUNT OF PEOPLE IN AN APARTMENT AND RECALCULATES THE MAINTENACE. IT IS ALSO "IDIOT PROOFED" SO THAT VALUES DO NOT EXCEED THE REGULATIONS OF THE BUILDING IT SELF */
                   case 'p':
                   //Idiot proof 1
                   System.out.println("Please enter floor number     : ");
                   floorNumber = keyboard.nextInt();
                   while (floorNumber > 2)
                   System.out.println("Floor number must be between 1 and 2. Try again: ");
                   floorNumber = keyboard.nextInt();
                   //Idiot proof 2               
                   System.out.println("Please enter apartment number : ");
                   aptNumber = keyboard.nextInt();
                   while (aptNumber > 3)
                   System.out.println("Apartment number must be between 1 and 3. Try again: ");
                   aptNumber = keyboard.nextInt();
                   //Idiot proof 3 with the amount of people being added at the same time.
                   System.out.println("How many people will there be : ");
                   int amountPeople = keyboard.nextInt();
                   cocoPalace[floorNumber - 1][aptNumber - 1] = amountPeople;
                   while (amountPeople > APARTMENT_MAX || totalBuilding > TOTAL_BUILDING_MAX || totalFloor > TOTAL_FLOOR_MAX  )
                          System.out.print("Too many people in building. Please try again : ");
                               amountPeople = keyboard.nextInt();
                        cocoPalace[floorNumber - 1][aptNumber - 1] = amountPeople;
                   break;
         while (menuChoice != 'x'|| menuChoice != 'a' || menuChoice != 'p' || menuChoice != 'b');
    //Method to calculate maintenance.
    private static double calculateMaintenance(int cocoPalace[][])
         int amountPeople = 0;
         for (int dex4 = 0; dex4 < 2; dex4++)
                   amountPeople += cocoPalace[0][dex4];
                   amountPeople += cocoPalace[1][dex4];
                   cocoPalace[0][dex4] = 2;
                   cocoPalace[1][dex4] = 2;     
              double buildingMaintenance = 5000/(amountPeople);
         return(buildingMaintenance);
    }

  • [svn:sb-sherlock] 14394: Mostly code cleanup on AbcParser.java, some comments/minor changes on confusing code found elsewhere.

    Revision: 14394
    Revision: 14394
    Author:   [email protected]
    Date:     2010-02-24 13:47:35 -0800 (Wed, 24 Feb 2010)
    Log Message:
    Mostly code cleanup on AbcParser.java, some comments/minor changes on confusing code found elsewhere.
    Modified Paths:
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/abc/AbcParser.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/parser/BinaryProgramNode.ja va
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/Builder.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/ConfigurationEval uator.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/FlowAnalyzer.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/ObjectValue.java

    Revision: 14394
    Revision: 14394
    Author:   [email protected]
    Date:     2010-02-24 13:47:35 -0800 (Wed, 24 Feb 2010)
    Log Message:
    Mostly code cleanup on AbcParser.java, some comments/minor changes on confusing code found elsewhere.
    Modified Paths:
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/abc/AbcParser.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/parser/BinaryProgramNode.ja va
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/Builder.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/ConfigurationEval uator.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/FlowAnalyzer.java
        flex/sdk/sandbox/sherlock/modules/asc/src/java/macromedia/asc/semantics/ObjectValue.java

  • Data type mismatch while writing a code in BADi

    Hi Experts,
    While writing a code in BADi, I am facing data type mismatch.
    Scenario:
    I have created the Infospoke based on one ODS and inside BADi i am looking up the other ODS fields.
    Two ODS's having 4 common key fields but one key field having the data type mismatch.
    While selecting the data from other ODS table in where condition it's giving the error data type mismatch.
    Could you please advice the same please.
    Thanks.
    Gana.

    Any update please....
    Thanks in advance.
    Edited by: Gananadha Lenka on Jun 18, 2010 1:57 PM

  • Need help in writing the code

    Hi,
    My table data is as below.
    Kunnr  BDAT EDAT  D1 D2 D3 D4 D5
    1111    2001  2002   1      2    1      2     1
    1111    2003  2008   1      0    4     1      2
    1111    2008  2011   1      1    1     1      1
    2222    2003  2008   1      2    2             2
    2222    2008  2011           1    2     1      1
    Here for kunnr  between begin and end date we have to caluclate the dependencies. (I.e if there is any value in D1or D2 or D3orD4 it shoulbe counted as 1. of it is zero or blank then it should not be coutned).
    for Ex: for 1111 between 2001 & 2002 tot dependencies are 5.            
               for 1111 between 2003 & 2008 tot dependencies are 4.
    in this scenario what will be the best way of writing the code. Do we need to check each and every field when counting the Sum value or and simple way to improve the performance.
    Regards,
    Vishnu
    Edited by: Vishnuvadhan K on May 13, 2011 10:30 AM
    Moderator Message: This is not a forum, where you can get your work done by others.
    Edited by: kishan P on May 13, 2011 3:52 PM

    Hi Vishnu,
    Here, you will have to check for the range of your begin date & end date. If it comes in the said range, then you simply have to add the values of your D1, D2,... DX values which you can store in some variables by setting out a flag as one counter for each.
    If your case is satisfied for any of the date range, then just check for the flag values which are satisfied & add them or display the sum of the number of counters.
    @Ambujavalli, At End Of won't work here because the date ranges given by Vishnu will differ.
    Those statements are useful in a case when suppose for the same field value, you need to calculate a particular sum.
    Here, that is not the case. Hence, AT First & At End Of won't work.
    Thanks,
    Gayathri.
    Edited by: gnikesh88 on May 13, 2011 11:52 AM

  • How doest jdk docs help as in writing java code?

    hi i wonder how does jdk docs help as in writing java code because if i google a java code the jdk docs always becomes the result of my search but in my experience jdk docs never helps me.
    is there any one know how to use jdk docs? and how to get the code from there.
    im telling about jdk docs from here http://download.oracle.com/javase/1.4.2/docs/api/
    cross posted from http://www.thenewboston.com/forum/viewtopic.php?f=119&t=13778
    Edited by: 871484 on Jul 18, 2011 4:18 PM

    871484 wrote:
    ok can any one give me example how to use jdk docs? for example this code
    Your question still does not make any sense, and you still haven't clarified what you're not understanding.
    However, if you think that just by reading the API docs, with no other training or study, that you will be able to write that code, then you are seriously misunderstanding the purpose of the docs.
    Obviously English is not your native language. You grew up speaking some other language at home and with your friends, and at some point in school or as private study, you started to learn English. You learned about the grammar and the alphabet and pronunciation, sentence structure, word order, etc. Now you have the basics of how the language works, and you know some words. When you want to learn new words to fit into the structure you have learned, you use a dictionary.
    If you didn't study the grammar, sentence structure, etc., and just said, "I want to learn English. I will look at a dicationary," clearly that would not work.
    Right?
    So, since you now understand and agree with the English example, let me state something that I hope is obvious to you by now: The API docs are your dictionary. They are not a substitute for learning the language basics.
    Furthermore, once you know the language basics in English and have your dictionary, you still won't know how to write a resume (which you may know as a CV). You will look at examples and perhaps take a course on resume (CV) writing. Just reading a dictionary won't help you write a resume(CV). Similarly, if you know some Java basics, you can't learn how to write a Swing app just by reading the Javadocs. You'll look at tutorials and examples. Then, once you know the basic structure of a Swing app, you'll look to the javadocs for more details about more kinds of GUI classes--different buttons and windows and panes and panels and layout managers, etc.

  • Any one could help me out in writing a code in VB for drawing an arc.

    Any one could help me out in writing a code in VB for drawing an arc.

    Here's the link to the scripting guides. http://www.adobe.com/devnet/illustrator/scripting.html

  • Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same

    Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same and is there any pre stalled text editor on mac if yes then where and if no then which text editor to install and how to install gcc...please help me out thanks in advance !!!

    I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding.
    Why? If you are developing and writing code on a Mac why would you not use the tools Apple has given you? And Xcode, once you get use to it, is a very nice development environment that will make you life a whole lot easier.
    If you insist on using an editor and the terminal I would recommend  Emacs   but it has a long learning curve so  something like TextWrangler  will work too.
    As for the compiler if you have Xcode installed install the command line tools and you will be able to compile from the terminal.
    good luck

  • EXC_BAD_ACCESS without writing any code!

    Hi
    This is driving me crazy so I hope someone can help. Basically, I am getting a EXCBADACCESS error in Xcode without writing a single line of my own code. It occurs if I open the same NSWindow object twice. The first time, the window opens perfectly but, the second time, it generates the error.
    I actually started getting this error in an app I am working on but couldn't find the fault and so created a brand new project to troubleshoot and still get the error from the most basic scenario possible. As follows:
    - Created a new project
    - Opened MainMenu.Nib in interface builder
    - Added an NSWindow object
    - Added a NSButton to the original NSWindow
    - Control Dragged to add a makeKeyAndOrderFront: to the new window
    - Built and Ran the App
    - Pushed the button and the second window came to the front
    - Closed the window, pushed the button again and EXCBADACCESS
    I have reinstalled the latest SDK twice without any joy.
    Any thoughts???
    Thanks

    findmoes wrote:
    This is driving me crazy ...
    You came to the right place.
    - Closed the window, pushed the button again and EXCBADACCESS
    By default NSWindow is released when closed. You can just uncheck +Release When Closed+ under Behavior in the Attributes Inspector. An alternative would be to connect another object's outlet to the window, e.g. the 'window' outlet of a window controller or a custom app delegate.
    Note that setting an object as the target of an action doesn't increase the reference count for the purpose of garbage collection and doesn't retain the object in a non-gc environment.
    Hope that helps!
    \- Ray

  • Error while writing a code for sending SMS in METHOD http_client_receive

    Hi friends,
                   I have a requirement, where i have to send a SMS from SAP system, i tried follwing codes but in both it is giving me same error. HTTP path mensioned below[ztest_02] is provided by service provider.
    I tried the same url in explorer and i received the SMS properly.
    REPORT ztest_02.
      CONCATENATE
      'http://hapi.smsapi.org/SendSMS.aspx?UserName=xyz&password=586998&MobileNo=919836789543'
      '&SenderID=serdc&CDMAHeader=919833678945&Message=Hirdffan'  INTO  wf_string .
      CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url                = wf_string
        IMPORTING
          client             = http_client
        EXCEPTIONS
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          OTHERS             = 4.".......................THIS IS WORKING FINE .. RETURNS SY-SUBRC = 0
      CALL METHOD http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.".......................THIS IS WORKING FINE .. RETURNS SY-SUBRC = 0
      CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.".......................NOT WORKING FINE .. RETURNS SY-SUBRC = 1
    I COPIED ANOTHER CODE FROM NET WHICH IS AS FOLLOWS AS GIVES SAME SY-SUBRC IN SAME METHOD.
    CONCATENATE 'http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName='
                p_cnt              INTO http_url .
    CALL METHOD cl_http_client=>create_by_url
       EXPORTING
         url                = http_url
       IMPORTING
         client             = http_client
       EXCEPTIONS
         argument_not_found = 1
         plugin_not_active  = 2
         internal_error     = 3
         OTHERS             = 4. " ...RETURNS SY-SUBRC = 0
    http_client->request->set_header_field( name  = '~request_method'
                                            value = 'GET' ).
    http_client->send( ).
    CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          OTHERS                     = 4.  '".........THIS RETURNS SY-SUBRC = 0
    My question is why it is failing in same call...
    Is there any authorisation issues?
    Any call is missing in between?
    Is there any network issue?
    pls help........
    Edited by: kiran chorge on Mar 11, 2010 7:42 AM

    Hi Kiran,
    I just resolved this error in my system. If you are running on AIX, then your DNS server will most likely not be configured. To fix this you just have to make the HTTP call without the domain name.
    Just ping the HTTP and find out which IP it is going to, then rewrite your HTTP address as below :
    http://<IP ADDRESS>/SendSMS.aspx?UserName=xyz&password=586998&MobileNo=919836789543'
    '&SenderID=serdc&CDMAHeader=919833678945&Message=Hirdffan
    This should resolve your error. Also the HTTP message you are getting in the given method actually refers to the problem in conversion of a domain name to an IP address as the DNS server is not available. So everything is most likely working fine.
    Thanks & Regards,
    Aditya

Maybe you are looking for