How to convert pl/sql code into java/j2ee

Hi,
We have a PL/SQL Oracle App server application that we will support if we can convert in j2ee/java. But when i did take a look at the code, these pl/sql contains all HTML and java code inside the stored procedures.
And iam looking to explore some tools and mechanisms that can convert these pl/sql in a JAVA application so that i can deploy this new app into my BEA81 environment.
Does any body has any idea:
a) How to convert from pl/sql > java ?
b) Any plugins or tools of BEA that can run these pl/sql (the way thay are currently...i.e w/o converting) in BEA 81 container ?
thanks, sangita

these pl/sql contains all HTML and java code insideJava or JavaScript. They are not the same. I wouldn't expect to see Java inside html, whereas JavaScript would be intermixed. On the other hand you might have a java stored proc (Oracle 9/10) which is generating HTML.
>
Does any body has any idea:Refactor.
I doubt it just has html and JavaScript/Java. So what you have is a mess that mixes several things that should have been seperate in the first place.

Similar Messages

  • How to transform this pascal code into java code!

    I want to transform this pascal code into java code . Please tel me how to do it because I really don't know how to do it!
    Thanks!
    {CALCULATE HOHN-LONDON FACTORS}
    var kk:tab4;
    PROCEDURE INTENS(var kk:tab4);
    begin
    for n:=0 to nr+2 do
    begin
    kk^[1,n]:=sqrt(lup*lup*yg*(yg-4)+4*sqr(n+1)) +lup*(yg-2);
    kk^[2,n]:= sqrt(lup*lup*yg*(yg-4)+4*sqr(n+1))-lup*(yg-2);
    kk^[3,n]:=0.5*(kk^[1,n]*kk^[1,n]+4*(sqr(n+1)-lup*lup));
    kk^[4,n]:= 0.5*(kk^[2,n]*kk^[2,n]+4*(sqr(n+1)-lup*lup));
    kk^[5,n]:= sqrt(ldown*ldown*yd*(yd-4)+4*sqr(n+1)) +ldown*(yd-2);
    end;
    end;
    BEGIN
    new (kk);
    intens(kk);
    writeln(f2,' ','N ','V','branch ','H-L');
    for n:=1 to np do
    begin
    fp1[n,v]:=(n-ldown)*(n+ldown+1)*sqr(kk^[2,n-1]*kk^[6,n]+4*(n+ldown)*(n-ldown+1));
    fp1[n,v]:=fp1[n,v]/(4*(n+0.5)*kk^[4,n-1]*kk^[8,n]) ;
    writeln(f2,' ',n,' ',v,' fp1 ',fp1[n,v]:10:2);
    end;
    for n:=1 to nq do
    begin
    fq1[n,v]:=sqr(kk^[2,n]*kk^[6,n]*(ldown+0.5)+4*(n-ldown+1)*(n+ldown+1)*(ldown-0.5)) ;
    fq1[n,v]:=fq1[n,v]/(2*(n+0.5)*kk^[4,n]*kk^[8,n]*(n+1.5));
    fq1[n,v]:=fq1[n,v]*(n+1);
    writeln(f2,' ',n,' ',v,' fq1 ',fq1[n,v]:10:2);
    end;
    for n:=1 to nr do
    begin
    fr1[n,v]:=sqr(kk^[2,n+1]*kk^[6,n]+4*(n-ldown+2)*(n+ldown+1));
    fr1[n,v]:=fr1[n,v]/(4*kk^[4,n+1]*kk^[8,n]*(n+1.5));
    fr1[n,v]:=fr1[n,v]*(n-ldown+1)*(n+ldown+2) ;
    writeln(f2,' ',n,' ',v,' fr1 ',fr1[n,v]:10:2);
    end;

    Basically it looks like this:
    public class KK{
         private your_type[][] kk = new your_type[length][length];
         private void intens(your_type[] kk){
              for(int n= 0; n<nr+2; n++){
                   kk[1][n] = Math.sqrt(lup*lup*yg*(yg-4)+4*Math.pow((n+1), 2)) +lup*(yg-2);
                   kk[2][n] = Math.sqrt(lup*lup*yg*(yg-4)+4*Math.pow((n+1), 2))-lup*(yg-2);
                   kk[3][n] = 0.5*(kk[1][n]*kk[1][n]+4*(Math.pow((n+1), 2)-lup*lup));
                   kk[4][n] = 0.5*(kk[2][n]*kk[2][n]+4*(Math.pow((n+1), 2)-lup*lup));
                   kk[5][n] = Math.sqrt(ldown*ldown*yd*(yd-4)+4*Math.pow((n+1), 2)) +ldown*(yd-2);
         public static void main(String args[]){
              KK k = new KK();
              k.intens(kk);
              System.out.println(f2  + ' ' + 'N ' + 'V' + 'branch ' + 'H-L');
              for(int n=1; n < np; n++){
                   fp1[n][v] = (n-ldown)*(n+ldown+1)*Math.pow((kk[2][n-1]*kk[6][n]+4*(n+ldown)*(n-ldown+1)), 2);
                   fp1[n][v] = fp1[n][v]/(4*(n+0.5)*kk[4][n-1]*kk[8][n]) ;
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fp1 ' + fp1[n][v]:10:2);
              for(int n=1; n< nq;n++){
                   fq1[n][v] = Math.pow((kk[2][n]*kk[6][n]*(ldown+0.5)+4*(n-ldown+1)*(n+ldown+1)*(ldown-0.5)), 2);
                   fq1[n][v] = fq1[n][v]/(2*(n+0.5)*kk[4][n]*kk[8][n]*(n+1.5));
                   fq1[n][v] = fq1[n][v]*(n+1);
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fq1 ' + fq1[n][v]:10:2);
              for(int n=1; n < nr; n++){
                   fr1[n][v] = Math.pow((kk[2][n+1]*kk[6][n]+4*(n-ldown+2)*(n+ldown+1)), 2);
                   fr1[n][v] = fr1[n][v]/(4*kk[4][n+1]*kk[8][n]*(n+1.5));
                   fr1[n][v] = fr1[n][v]*(n-ldown+1)*(n+ldown+2) ;
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fr1 ' + fr1[n][v]:10:2); //fr1[n][v]:10:2 --> Here you must use the BigDecimal class
    }I'm not very sure because my pascal knowledge is extremely "dated".
    What about the converter I told you about?

  • How to convert a .class file into .java file without .jad using DeJDecompil

    Hi all,
    I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
    If I get the .java file without error then I can process the rest of the functionality.
    Thanks in advance
    With kind Regs
    Satheesh.K

    Not so urgent today then!
    http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
    I'm still not going to help you to steal someone�s code.

  • How to convert following ABAP routine into Java

    Hi Experts
    I m new to IPC
    How to convert following ABAP routine int java
    READ TABLE XKOMV INTO XKOMV_AUX WITH KEY
                 KSCHL = 'ZCU2'
                 KPOSN = komp-kposn.
      IF SY-SUBRC EQ 0.
        MOVE XKOMV_AUX-KWERT TO XKWERT.
        MOVE XKOMV_AUX-KBETR TO XKOMV-KBETR.
            w_kwert = xkomv_aux-kwert * -1.
    DO any one has documentation on convertion of abap routines into java
    Thanks & Regards
    Sowmya

    Hi sowmya,
    download this document through this u can solveur problem
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/107adc1a-0501-0010-de8e-973e0fb4049b
    Reward if helps
    Regards
    Manohar

  • How can i rewrite this code into java?

    How can i rewrite this code into a java that has a return value?
    this code is written in vb6
    Private Function IsOdd(pintNumberIn) As Boolean
        If (pintNumberIn Mod 2) = 0 Then
            IsOdd = False
        Else
            IsOdd = True
        End If
    End Function   
    Private Sub cmdTryIt_Click()
              Dim intNumIn  As Integer
              Dim blnNumIsOdd     As Boolean
              intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
              blnNumIsOdd = IsOdd(intNumIn)
              If blnNumIsOdd Then
           Print "The number that you entered is odd."
        Else
           Print "The number that you entered is not odd."
        End If
    End Sub

    873221 wrote:
    I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
    I'm just trying to get you to think about what your post actually says, and what others will take from it.
    what does this error mean? what code should i replace and add? thanks for all response
    C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=true;
    ^
    C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=false;
    ^
    2 errors
    Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
    It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
    So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself?

  • How to convert pl/sql block into single update statement

    Dear all gurus,
    I have pl/sql block mention below, Can I convert this pl/sql block to single update statement if possible?
    If not how to optimize this block?
    Pleaese suggest.
    thanks in advance.
    Vijay
    DECLARE
    CURSOR vt_mlr_cursor IS Select master_key, user4 from vt_mlr Where USER4 is not null;
    USERFIELD VARCHAR2(100);
    C1 VARCHAR2(3); /* this will return location of first space = 12 */
    C2 VARCHAR2(3); /* this will return location of second space = 20 */
    C3 VARCHAR2(3); /* this will return location of third space = 28 */
    C4 VARCHAR2(3); /* this will return location of forth space = 35 */
    Field1 VARCHAR2(40); /* this will return FTMYFLXA04W */
    Field2 VARCHAR2(10); /* this will return VPI0043 */
    Field3 VARCHAR2(10); /* this will return VCI0184 */
    Field4 VARCHAR2(10); /* this will return 005 */
    Field5 VARCHAR2(10); /* this will return 00001 */
    Field_2_n_3 VARCHAR2(25);
    key VARCHAR2(10);
    BEGIN
    FOR vt_mlr_record IN vt_mlr_cursor
    LOOP
    key := vt_mlr_record.master_key;
    USERFIELD := vt_mlr_record.user4;
    C1 := INSTR(vt_mlr_record.user4,' ',1,1); /* this will return location of first space = 12 */
    C2 := INSTR(vt_mlr_record.user4,' ',1,2); /* this will return location of second space = 20 */
    C3 := INSTR(vt_mlr_record.user4,' ',1,3); /* this will return location of third space = 28 */
    C4 := INSTR(vt_mlr_record.user4,' ',1,4); /* this will return location of forth space = 35 */
    Field1 := SUBSTR(vt_mlr_record.user4,1,C1-1); /* this will return FTMYFLXA04W */
    Field2 := SUBSTR(vt_mlr_record.user4,C1+4,C2-C1-4); /* this will return VPI0043 */
    Field3 := SUBSTR(vt_mlr_record.user4,C2+4,C3-C2-4); /* this will return VCI0184 */
    Field4 := SUBSTR(vt_mlr_record.user4,C3+4,C4-C3-4); /* this will return 005 */
    Field5 := SUBSTR(vt_mlr_record.user4,C4+4,LENGTH(vt_mlr_record.user4)-C4-3); /* this will return 00001 */
    Field_2_n_3 := Field2 || '/' || Field3;
    /*DBMS_OUTPUT.PUT_LINE ('Current key is: ' || vt_mlr_record.master_key);*/
    UPDATE vt_mlr
    SET
    aggregator_clli = Field1,
    aggregator_vpi_vci = Field_2_n_3,
    aggregator_slot = Field4,
    aggregator_port = Field5
    WHERE
    master_key = vt_mlr_record.master_key;
    END LOOP;
    END;
    /

    Hi Vijay,
    Here's something to start with, you should be able to complete it.
    First, combine your select and update statements:
    update vt_mlr
       set aggregator_clli = field1
          ,aggregator_vpi_vci = field_2_n_3
          ,aggregator_slot = field4
          ,aggregator_port = field5
    where user4 is not null;Then put these two
    C1 := INSTR(vt_mlr_record.user4,' ',1,1); 
    Field1 := SUBSTR(vt_mlr_record.user4,1,C1-1);into
    Field1 := SUBSTR(vt_mlr_record.user4,1,INSTR(vt_mlr_record.user4,' ',1,1) -1);And put it into the update statement, removing reference to record
    (I have also removed default values for position and occurrence in instr function):
    update vt_mlr
       set aggregator_clli = substr(user4, 1, instr(user4,' ') - 1)
          ,aggregator_vpi_vci = field_2_n_3
          ,aggregator_slot = field4
          ,aggregator_port = field5
    where user4 is not null; I think you can do the rest from here ;-)
    Regards
    Peter

  • How to convert 864 Transaction code into XML in EDI to File Scenario

    Hello Friends,
                            Can any body help me out in using 864 Transaction Code (Tex Message) in EDI to Flat File Conversion?? I mean i am using just 2 Fields i.e  Name and Address.I didnt understand the Format given<u><i>..Here is the format for Name
    N1 Name                                                           </i></u>                 Pos: 040 Max: 1
                                                                                    Heading - Optional
                                                                                    Loop: N1 Elements: 4
    To identify a party by type of organization, name, and code
    Element Summary:
    <u><i>Ref     Id       Element Name                     Req  Type    Min/Max    Usage</i></u>
    N101 98        Entity Identifier Code             M      ID        2/3          Must use
    Description: Code identifying an organizational entity, a physical
    location, property or an individual
    All valid standard codes are used.
    N102   93      Name                                  C     AN       1/60            Used
    Description: Free-form name
    N103 66        Identification Code Qualifier   C     ID        1/2              Used
    Description: Code designating the system/method of code structure used
    for Identification Code (67)
    All valid standard codes are used.
    N104 67        Identification Code                C     AN        2/80           Used
    Description: Code identifying a party or other code
    Syntax:
    1. N102 R0203 -- At least one of N102 or N103 is required.
    2. N103 P0304 -- If either N103 or N104 are present, then the others are required.
    Comments:
    1. This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104)
    must provide a key to the table maintained by the transaction processing party.
    2. N105 and N106 further define the type of entity in N101.
    [<u>b]
    Here is the format for Address</b></u>
    N3 Address Information                                                 Pos: 060 Max: 2
                                                                                    Heading - Optional
                                                                                    Loop: N1 Elements: 2
    To specify the location of the named party
    Element Summary:
    <b><u><i>Ref            Id              Element Name            Req     Type      Min/Max   Usage</i></u></b>
    N301        166            Address Information       M        AN         1/55       Must use
    Description: Address information
    N302 166 Address Information
    Description: Address information                     O          AN         1/55       Used
    So Help me hoe to convert this into XML...

    try this
    For EDI U need SEEBURGER Adapter or Conversion agent by itemfield.
    Using Conversion agent convert EDI Into XSD and Import using External definition.
    Have look
    EDI Conversion
    Re: Seeburger Splitter adapter!!
    Thanks

  • How to convert an sql query into a recordset?

    HI, I'm having a hard time building a locations of service form for users to insert, update the cities, counties, zip codes based on the states selected.
    so I found this  query that works great if I use basic  menus and text boxes, but can't use to make comma separated menus because it is nat a record set.
    The problem is that I have a table called zip_codes, with the following fields: state_label, Zip_b, county, city.
    zip codes correspond to the cities, counties and states.
    example:
    Colorado,  Colorado Springs, El Paso,  80918
    Users make a selection of state or states and the recordset is filtered by user selection.
    I manage the part of making a select mutiple drop menu that passes the values to my query page like this.
    <form action="litsTA.php"; method="post">
    <h3>Choose State(s)</h3>
    <p>hold Control key to select multiple states</p>
    <select  name="States_served[]_<?php echo $cnt1; ?>" multiple="multiple" onchange='showselection()'>
      <?php
    do { 
    ?>
      <option value="<?php echo $row_state['state_label']?>"><?php echo $row_state['state_label']?></option>
      <?php
    } while ($row_state = mysql_fetch_assoc($state));
      $rows = mysql_num_rows($state);
      if($rows > 0) {
          mysql_data_seek($state, 0);
           $row_state = mysql_fetch_assoc($state);
    ?>
    </select>
    <p>
      <input type="submit" value="submit" />
    </p>
    </form>
    And the query I need to convert into a recordset looks like this
      mysql_select_db($database_duitop, $duitop);
    $query_TONY = "SELECT * FROM zip_code WHERE state_label IN (";  
    for ($i=0; $i<=count($state_list)-1; $i++) {
    //echo $state_list[$i];
    $query_TONY = $query_TONY . "'" . $state_list[$i] . "'";
    if ($i < count($state_list)-1) {
    $query_TONY = $query_TONY . ", ";
    $query_TONY = $query_TONY . ") GROUP BY county ORDER BY state_label, city ASC";
    Any way that was my attempt to converting the query into a recordset.
    any help, or samples will be appreciated.

    Use Tcode SQ01.
    Give the query name press Enter.
    The query will be listed in the table below.
    Select the Query => From the Main menu select QUERY => More Functions => Display Report Name.
    You will get the program name, now go to Se38 and display the program...

  • How to convert the following code into an applet

    Please reply for me as soon as you can.
    import java.io.*;
    import java.awt.Frame;
    import java.awt.FlowLayout;
    import java.awt.Color;
    import java.awt.Insets;
    import java.awt.Dimension;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowEvent;
    import java.util.Enumeration;
    import javax.comm.CommPort;
    import javax.comm.CommPortIdentifier;
    import javax.comm.SerialPort;
    import javax.comm.NoSuchPortException;
    import javax.comm.PortInUseException;
    public class BlackBox extends Frame implements WindowListener
         static int               portNum = 0,
                             panelNum = 0,
                             rcvDelay = 0;
         static SerialPortDisplay[]     portDisp;
         static BlackBox           win;
         static boolean               threaded = true,
                             silentReceive = false,
                             modemMode = false,
                             friendly = false;
         public BlackBox()
              super("Serial Port Black Box Tester");
              addNotify();
              addWindowListener(this);
         public void windowIconified(WindowEvent event)
         public void windowDeiconified(WindowEvent event)
         public void windowOpened(WindowEvent event)
         public void windowClosed(WindowEvent event)
         public void windowActivated(WindowEvent event)
         public void windowDeactivated(WindowEvent event)
         public void windowClosing(WindowEvent event)
              cleanup();
              dispose();
              System.exit(0);
         public static void main(String[] args)
              Enumeration           ports;
              CommPortIdentifier     portId;
              boolean               allPorts = true,
                             lineMonitor = false;
              int               idx = 0;
              win = new BlackBox();
              win.setLayout(new FlowLayout());
              win.setBackground(Color.gray);
              portDisp = new SerialPortDisplay[4];
              while (args.length > idx)
                   if (args[idx].equals("-h"))
                        printUsage();
                   else if (args[idx].equals("-f"))
                        friendly = true;
                        System.out.println("Friendly mode");
                   else if (args[idx].equals("-n"))
                        threaded = false;
                        System.out.println("No threads");
                   else if (args[idx].equals("-l"))
                        lineMonitor = true;
                        System.out.println("Line Monitor mode");
                   else if (args[idx].equals("-m"))
                        modemMode = true;
                        System.out.println("Modem mode");
                   else if (args[idx].equals("-s"))
                        silentReceive = true;
                        System.out.println("Silent Reciever");
                   else if (args[idx].equals("-d"))
                        idx++;
                        rcvDelay = new Integer(args[idx]).intValue();
                        System.out.println("Receive delay = "
                                  + rcvDelay + " msecs");
                   else if (args[idx].equals("-p"))
                        idx++;
                        while (args.length > idx)
                             * Get the specific port
                             try
                                  portId =
                                  CommPortIdentifier.getPortIdentifier(args[idx]);
                                  System.out.println("Opening port "
                                       + portId.getName());
                                  win.addPort(portId);
                             catch (NoSuchPortException e)
                                  System.out.println("Port "
                                            + args[idx]
                                            + " not found!");
                             idx++;
                        allPorts = false;
                        break;
                   else
                        System.out.println("Unknown option "
                                  + args[idx]);
                        printUsage();
                   idx++;
              if (allPorts)
                   * Get an enumeration of all of the comm ports
                   * on the machine
                   ports = CommPortIdentifier.getPortIdentifiers();
                   if (ports == null)
                        System.out.println("No comm ports found!");
                        return;
                   while (ports.hasMoreElements())
                        * Get the specific port
                        portId = (CommPortIdentifier)
                                       ports.nextElement();
                        win.addPort(portId);
              if (portNum > 0)
                   if (lineMonitor)
                        if (portNum >= 2)
                             portDisp[0].setLineMonitor(portDisp[1],
                                            true);
                        else
                             System.out.println("Need 2 ports for line monitor!");
                             System.exit(0);
              else
                   System.out.println("No serial ports found!");
                   System.exit(0);
         private void addPort(CommPortIdentifier     portId)
              * Is this a serial port?
              if (portId.getPortType()
              == CommPortIdentifier.PORT_SERIAL)
                   // Is the port in use?     
                   if (portId.isCurrentlyOwned())
                        System.out.println("Detected "
                                  + portId.getName()
                                  + " in use by "
                                  + portId.getCurrentOwner());
                   * Open the port and add it to our GUI
                   try
                        portDisp[portNum] = new
                             SerialPortDisplay(portId,
                                       threaded,
                                       friendly,
                                       silentReceive,
                                       modemMode,
                                       rcvDelay,
                                       win);
                        this.portNum++;
                   catch (PortInUseException e)
                        System.out.println(portId.getName()
                                  + " in use by "
                                  + e.currentOwner);
         public void addPanel(SerialPortDisplay     panel)
              Dimension     dim;
              Insets          ins;
              win.add(panel);
              win.validate();
              dim = panel.getSize();
              ins = win.getInsets();
              dim.height = ((this.panelNum + 1) * (dim.height + ins.top
                        + ins.bottom)) + 10;
              dim.width = dim.width + ins.left + ins.right + 20;
              win.setSize(dim);
              win.show();
              panelNum++;
         static void printUsage()
              System.out.println("Usage: BlackBox [-h] | [-f] [-l] [-m] [-n] [-s] [-d receive_delay] [-p ports]");
              System.out.println("Where:");
              System.out.println("\t-h     this usage message");
              System.out.println("\t-f     friendly - relinquish port if requested");
              System.out.println("\t-l     run as a line monitor");
              System.out.println("\t-m     newline is \\n\\r (modem mode)");
              System.out.println("\t-n     do not use receiver threads");
              System.out.println("\t-s     don't display received data");
              System.out.println("\t-d     sleep for receive_delay msecs after each read");
              System.out.println("\t-p     list of ports to open (separated by spaces)");
              System.exit(0);
         private void cleanup()
              SerialPort     p;
              while (portNum > 0)
                   portNum--;
                   panelNum--;
                   * Close the port
                   p = portDisp[portNum].getPort();
                   if (p != null)
                        System.out.println("Closing port "
                                  + portNum
                                  + " ("
                                  + p.getName()
                                  + ")");
                        portDisp[portNum].closeBBPort();
    }

    hi welcome to java forum,
    please do one thing for me so that i can help you, can you put your code in a code tag [code ][code ] (without spaces) so that your code can be readable easily

  • How to convert this VB code into c#

    Public Property Cell(ByVal row_index As Integer, ByVal col_index As Integer) As Object
    Get
    Return _excel.Cells(row_index, col_index).value
    End Get
    Set(ByVal value As Object)
    _excel.Cells(row_index, col_index).value = value
    End Set
    End Property
    Thanks.

    If you want to have a property called Cell that returns excel's Cells collection (which is a Range) then just do this:
    public Range Cells
    public get
    return _excel.Cells;
    // Range is accessed by .Cells
    // Range has an index operator [,]
    // so you can access .Cells[row,col]
    If you want to intercept the indexing, then you must return a object that proxies the indexing.
    class MyRange
    public MyRange( Range range ) { this.range = range; }
    Range range;
    // This just might be the syntax you're actually looking for
    public object this[int row, int col]
    get {
    return range[row,col];
    set
    range[row,col] = value;
    public MyRange Cells
    get {
    return new MyRange( _excel.Cells );

  • Converting T-SQL proc into Oracle

    I need help in converting the following stored procedure into PL/SQL code. Basically I need to know corresponding function names for the various T-SQL constructs below. The parameter @PROC_NUM is passed by the caller with value @@PROCID which is the T-SQL global variable for the ID of the current stored procedure being executed by SQL Server. Thanks in advance for all the help.
    CREATE PROCEDURE [dbo].MARS_MPPM_HANDLE_ERROR
         @PROC_NUM          INT
    AS
    BEGIN
         -- SET NOCOUNT ON added to prevent extra result sets from
         -- interfering with SELECT statements.
         SET NOCOUNT ON;
         DECLARE @ERROR_NUMBER          INT
         DECLARE @ERROR_SEVERITY          INT
         DECLARE @ERROR_STATE          INT
         DECLARE @ERROR_PROCEDURE     Varchar(1000)
         DECLARE @ERROR_LINE               INT
         DECLARE @ERROR_MESSAGE          Varchar(8000)
         DECLARE @PROC_NAME               Varchar(255)
         SELECT
              @ERROR_NUMBER = ERROR_NUMBER(),
              @ERROR_SEVERITY = ERROR_SEVERITY(),
              @ERROR_STATE = ERROR_STATE(),
              @ERROR_PROCEDURE = ERROR_PROCEDURE(),
              @ERROR_LINE = ERROR_LINE(),
              @ERROR_MESSAGE = ERROR_MESSAGE(),
              @PROC_NAME = OBJECT_NAME( @PROC_NUM )
              IF 50000 = @ERROR_NUMBER
              BEGIN
                   RAISERROR( '%s -> %s', 16, 1, @PROC_NAME, @ERROR_MESSAGE )
              END
              ELSE
              BEGIN
                   RAISERROR( '%s -> Error Number = %d, Error Severity = %d, Error State = %d, Error Procedure = %s, Error Line = %d, Error Message = %s',
                        16,
                        1,
                        @PROC_NAME,
                        @ERROR_NUMBER,
                        @ERROR_SEVERITY,
                        @ERROR_STATE,
                        @ERROR_PROCEDURE,
                        @ERROR_LINE,
                        @ERROR_MESSAGE )
              END
    END

    875311 wrote:
    I need help in converting the following stored procedure into PL/SQL code.
    Re: How can i rewrite this code into java?
    This is true of any language, to adapt to this case
    1) Learn T-SQL
    2) Understand what that code does, that is, what its job is.
    3) Learn PL/SQL.
    4) Write PL/SQL code that fulfills the requirements fleshed out in step 2.
    The absolutely wrong way to do it is to try a mindless, mechanical translation.
    Re: How can i rewrite this code into java?
    >
    Seriously, you need to go through a Java tutorial from the beginning. Just trying to force another language's syntax onto Java without actually understanding anything about Java, and then posting questions here when you get stuck--questions that you could have and should have answered by doing the tutoria--is a horrible approach.
    >
    Replace Java with PL/SQL for same answer.
    Getting started with PL/SQL
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10766/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/toc.htm

  • How to convert Vb code into java?

    Hi,
    I want to know how to make conversion a visual basic source code into java. The conversion could be (1:1) scale.
    Is there any compilers making the live easier (solving this problem) ?
    Thank you all.
    Abu_ramla

    Use the JNI. VB doesent actually do anything on its own. Its just a series of calls on COM objects to performs all its work. You can call these same COM objects using the Java Native Interface or JNI. You wont have access to things designed in VB though like forms, you will have to redesign those.
    This will take extensive knowledge of COM, VB, Java, and JNI. It will take you about 1 year to get up to speed. I would say to not do this.

  • Converting CPP code into JAVA Code

    i have made a cpp file that is running fine... is ther a tool which can convert that cpp file into java file easily?

    No

  • Again,HOW to conver a .class file into .java one?

    sorry , but Can't u send me a specific link for downloading this "Java decomplier"??
    coz I found my self in something called (jad decompiler) with lots of versions and this is confusing
    and Is that mean, that there's a decompiler which can convert the .class file into .java one?
    and thanks alot man.....u help me always!
    (I'm still begginner in java)

    Just to emphasise what yawmark said...
    Decompiled java code is NEVER going to be as clear as well-written original java source code. The decompiler can see what the compiled code does but not why or what it means, so the source code that the decompiler produces is going to be ugly and hard to read. Decompilers are really only useful for experienced programmers who know what to infer, how to read between the lines...
    If you need help writing something, then you're better off looking at tutorials. In tutorials the code will be well-commented.

  • How to convert an int variable into String type

    hi everybody
    i want to know how to convert an interger variable into string variable
    i have to implement a code which goes like this
    Chioce ch;
    for(int i=0;i<32;i++)
    // here i need a code to convert the int variable i into a string variable
    ch.add(String variable);
    how do i convert that int variable i into a String type variable??
    can anyone help me?

    Different methods:
    int a;
    string s=a+"";or
    String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
    Ema

Maybe you are looking for