Inputting multiple arguments into a method

Hi,
I have somewhat of a problem. I'm trying to create a method, stringQuery, and I do not know how many arguments the method will take.
Allow me to explain my goal, so you can have some idea of what I'm talking about.
I want to create a method that will basically generate a SQL query (no, this is NOT a JDBC question) from text. This method should be able to take a large number of String arguments, because the user might want to select one thing from the database, or he or she might want to select five things, or he or she might want to select twenty things.
Because of this, there is not a set number of arguments for my stringQuery method.
Furthermore, the method should also be able to take a large number of float arguments, in case the user wants to specify where he or she is selecting data from.
It's just a mess, I'm not sure where to start, and I'm pretty damn sure there must be a better way. I can specify that I want an infinite number of Strings by saying something like this:
public static String stringQuery(String... select)But I cannot do the same for floats, or for another String array. Or can I? If I try to do something like:
public static String stringQuery(String... select, float... foo)I get a syntax error, that says "select must be the last parameter". If I change the order, it will say "foo must be the last parameter", obviously. Therefore, I can't do that.
I realize this is a lot of information. However, if someone could please point me in the right direction here (either how to do what I am trying to do, or a better method for what I am trying to do), I would be very appreciative.
Also, please let me know if this didn't make much sense, and what part of it didn't make sense.
Thanks,
Dan

I'm not too sure what you mean by this. Do you know
of any links or resources that can explain this
further?Search for "Object-Oriented Programming".public class SQLBuilder {
  private // some list of selection criteria
  public SQLBuilder() {
    // initialize the list to empty
  public void addCriterion(String name, String value) {
    // add this criterion to the list
  public void addCriterion(String name, int value) {
    // add this criterion to the list
  // many more overloaded addCriterion methods could go here
  public String toString() {
    // compute the SQL string based on the list
}And to use that:SQLBuilder builder = new SQLBuilder();
builder.addCriterion("name", "Arthur Eddington");
builder.addCriterion("answer", 137);
String query = builder.toString();

Similar Messages

  • Send multiple argument to backend method

    Dear All,
    I am trying to send the multiple arguments to backend server method using Remote Object. At the backend I am using Weborb for .net
    private function initWebOrb(event:AppEvent):void
        weborbCallback = event.callback;
    var method:String = event.data.method as String;
    var data:Array  = event.parameterdata;
    var op:AbstractOperation = remoteDataObject.getOperation(method);
    op.addEventListener("result", getListResultHandler);
    op.addEventListener("fault", onerrorweborb);
    op.arguments =data;
    op.send();
    but It shows the error unable to find method with name "Testmethod"  and the given argument types  at Weborb.Util.MethodLookup..........
    I have also tried.
    private function initWebOrb(event:AppEvent):void
       weborbCallback = event.callback;
    var method:String = event.data.method as String;
    var data:Array  = event.parameterdata;
    var op:AbstractOperation = remoteDataObject.getOperation(method);
    op.addEventListener("result", getListResultHandler);
    op.addEventListener("fault", onerrorweborb);
    op.send(data);
    I also tried to send the data as object
    var data:Object  = event.parameterdata;
    Note: I change the argument type accordingly while dispatching this event.

    try this
    <%
    int parameter=0;
    %>
    <f:invoke var="${bpmobject}" methodName="oper" retAttName="op" retAttScope = "Page">           
                   <f:arg value=<%= parameter> type="int"/>
    </f:invoke>
    the name of bpmobject passed in the arguments form ...
    edit : http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/taglib/f/arg.html
    Edited by: cealex on Jan 24, 2010 5:34 AM - :pass "parameter" Parameter :)

  • Trying to pass arguments into a method call and failing

    Hi everyone, I'm fairly new to programming, and newer to Java. I'm currently working on a project that pulls fields from a database based on a name, and I'm having some trouble getting the connection string set up.
    Statically defined, the database connects and the program logic that follows works just fine. The problem is that to future-proof this application, I need to pass the database URL, port, db instance, username, and password into the program as arguments from the batch file that will then be scheduled to run the program on a job-by-job basis.
    Product Version: NetBeans IDE 6.1 (Build 200805300101)
    Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
    Userdir: C:\Documents and Settings\xxxxxxxxxxx.SPROPANE\.netbeans\6.1
    Here's my current working source (with the network addresses obfuscated):
    package processsqrjob;
    import java.io.*;
    import java.sql.*;
    import java.util.Date;
    public class Main {
         * @param args jobname, jobparameters, HYPusername, HYPpassword, HYPservername, HYPport, oracleDBURL, oracleport (default 1512), SID (dbb?), oracleusername, oraclepass
         * @throws exeption
        // jobname [0], jobparams[1], hypusername [2], hyppassword [3], hypservername [4], hypport[5], oracledburl[6], oracleport[7], sid[8], oracleusername[9], oraclepass[10]
        public static void main(String[] args) throws SQLException
            DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
            Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracleserver.local.intranet.com:1521:dbname", "username", "pass");
            Statement stmt = con.createStatement();
            Date date = new Date(); //get the system date for output to both the error log and the DB's lastrun field
            System.out.println(date); //print the date out to the console
            System.out.println(args[0]); //print the job name to the console
            String sourcefolder=""; //we're going to load the job source folder into this variable based on the job's name
            String destfolder="";//same with this variable, except it's going to get the destination folder
            try {
                ResultSet rs = stmt.executeQuery("SELECT * FROM myschema.jobs WHERE NAME =\'"+args[0]+"\'");
                while ( rs.next() ) {
                    sourcefolder = rs.getString("sourcefolder");
                    destfolder = rs.getString("destfolder");
                stmt.executeQuery("UPDATE myschema.jobs SET lastrun ='"+date+"' WHERE name ='"+args[0]+"'");//put this after hyp code
    //            System.out.println(sourcefolder);
    //            System.out.println(destfolder);
    //            System.out.println(description);
                stmt.close(); //close up the socket to prevent leaks
            }catch(SQLException ex){
                System.err.println("SQLException: " + ex.getMessage());
                logError(args[0], ex.getMessage());
    }That works, and it connects to the database and everything. But when I pass the variables in from the project properties run settings, I get the following exception:
    Exception in thread "main" java.sql.SQLException: invalid arguments in call
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:235)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:440)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
            at java.sql.DriverManager.getConnection(DriverManager.java:582)
            at java.sql.DriverManager.getConnection(DriverManager.java:207)
            at processsqrjob.Main.main(Main.java:42)
    Java Result: 1That is with Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracleserver.local.intranet.com:1521:dbname", "username", "pass"); changed to Connection con = DriverManager.getConnection("jdbc:oracle:thin:@"+args[6]+":"+args[7]+":"+args[8]+"\", \""+args[9]+"\", \""+args[10]+"\"");{code}, with args 6 7 8 and 9 set to url, port, dbinstance, username, and password respectively.
    Perhaps it's the way I'm escaping the quotation marks, but I put that same line inside a System.out.println() and it output it exactly as I had typed it in statically before, so I don't know what it could be.
    I would really appreciate any advice. Thanks in advance for your time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I think you're mixing up SQL and Java. The Java method expects the user name and password as separate parameters, not encoded in one String. So you shouldn't be concatenating args[9] and args[10] at all, they should remain as separate parameters.
    The call should be:DriverManager.getConnection("jdbc:oracle:thin:@" + args[6] + ":"+ args[7] + ":" + args[8], args[9], args[10]);
                                                     parameter 1                                  2         3

  • Getting  JButton on pressed to input a value into Scanner method nextLine()

    Is it possible to get a JButton within an action performed method to insert a string value into the Scanner method nextLine() within a different method?
    Information would be greatfull!

    I'm not sure if I understand your question correctly, but I don't think so.
    Perhaps you could post a short (pseudo-)code example of what you want?

  • How to input multi-key into card in JCOP with secure channel ?

    When I input multiple keys into JCOP ,it returs 6982. It seems I calculate the wrong C-MAC value. The steps as follows:
    //auth mac
    --> 80 50 00 00 08 DE 6E AB 3C 27 16 74 23 00
    <--00 00 71 25 00 11 96 91 17 84 FF 02 00 07 2E CC EB B6 BA 1F B0 9C 4D 0A 23 D8 39 1A 90 00
    --> 84 82 01 00 10 62 68 D5 CE 75 B6 39 41 14 E9 94 B1 50 E1 C8 49
    <--90 00
    //put keyset 1
    --> 84 D8 00 81 4B 01 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 27 02 3E BF DE 0E FE B6 00
    <--69 82
    When I auth without mac, I can put-keyset correctly.So It seems something wrong with C-MAC value.But I can send other command and get correct response with C-MAC.
    The source data I input to calculate C-MAC is:
    84 D8 00 81 4B 01 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47 80 10 6C CC 3D 43 CF C2 CD E6 CE AB C7 60 46 8B 7E FF 03 8B AF 47.

    The reason you get an error is because you did not encrypt sensitive data. GP mandates that security domain keys must be encrypted with the encryption session key (derived from Data Encryption Key), regardless of the security level used.

  • How do I scan multiple pages into one pdf file using the PIXMA MG7520 on Windows 8.0? Please help!

    I recently received a PIXMA MG7520 for a gift.  It works great with my lenovo laptop/tablet running on Windos 8.0.  The one drawback to the HP all-in-one that it replaced is it does not have an ADF.  That being said, there must be some way to scan multiple pages into one pdf file.  I need help figuring thing out.  Thanks in advance!
    Solved!
    Go to Solution.

    Hi mdtolbert54,
    There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single PDF document.  To do this, please follow these steps:
    1. On your keyboard, press the Windows key.
    2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it.
    3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    4. Click the DOCUMENT SCAN option on the left pane of the window.
    5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
    a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
    b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option. 
    c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
    6. Once all settings have been selected, click the OK button at the bottom of the window to save the changes. The IJ Scan Utility main screen appears.
    7. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed. Scanned items are saved in previously selected folder location specified in the SETTINGS... window.
    If you find that you need advanced scanning options such as adjusting resolution, brightness, contrast, saturation, color balance, etc. in addition to the options selected above, please click on the SCANGEAR button on the IJ Scan Utility Main screen, then adjust the items as necessary.
    Once the items above are set for document scanning, in the future, you will only need to launch the IJ Scan Utility, then press the DOCUMENT button to perform the scan (unless you want to make changes to the settings).
    Hope this helps!
    This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Table Cell Editor which allows to input multiple lines of text...

    Hi there
    Does anyone know how to write a table cell editor which allows users to input multiple lines of text? please provide some sample if possible...
    Thanks
    Ken

    I'm assuming you also want the renderer to display multiple lines? if so, make a class that extends JTextArea and that implements the TableCellEditor and TableCellRenderer interfaces, then set instances of this as the editor and renderer for the TableColumn in question. The implementation of most of the methods in these interfaces is trivial, often just this.setBackground() based on the table.getSelectionBackground() or table.getBackground(), a this.setText() based on the value passed in, then just a 'return this'.
    You might want to make an abstract class which implements these interfaces for you, and which delegates to a simple abstract method that you override to return the renderer/editor component.
    Note that you must use two instances of the class you make, one for the renderer and one for the editor, since it must be able to be able to render the remainder of the table's cells without interfering with the JTextArea performing the editing. (alternatively you could make two classes that extend JTextArea, each just implementing one of the interfaces, but this is more effort I think.) Also note that you must increase the table's row height to get more than one row visible.

  • Multiple selection for Payment Methods.

    TABLES: V_T042E.   
    DATA: s_zwels_con(3).
    SELECT-OPTIONS: s_zwels FOR V_T042E-ZLSCH NO INTERVALS,"payment methods
    ********************   I N I T I A L I Z A T I O N   *******************
    INITIALIZATION.
    ***************   A T   S E L E C T I O N   S C R E E N   **************
    AT SELECTION-SCREEN.
    CONCATENATE s_zwels INTO s_zwels_con SEPARATED BY SPACE.
    This is the code I tried for multiple selection of Payment Methods.This doesnot display the multiple values selected on selection screen.
    Later in program these values will be reflected in Payment Methods in BDC recording using F110 transaction.
    But this code is giving an error :
    Unable to interpret "S_ZWELS". Possible causes of error: Incorrect spelling or comma error.     
    Please can any help in rectifying the current method or any other method of mutliple selection for Payment methods on selection screen .

    u have to put like this only
    <b>SELECT-OPTIONS: s_zwels FOR V_T042E-ZLSCH NO INTERVALS
    "payment methods</b>
    here u have to loop then only u will get desired o/p
    loop at s_zwels.
    endloop.
    but its not the complete solution.
    Regards
    Prabhu

  • Passing multiple arguments to CFC ???

    I am passing two parameters to a CFC via WebService, as seen
    below. This works fine.
    WebService.MyCFC(argument1, argument2);
    However, I have some CFC functions that I am passing more
    than 10 arguments into. Instead of having a lengthy string of
    arguments on my above code, I would like to create an object
    (array?) that stores each argument. I did this when I was coding in
    CF7 using the ColdFusion tags that rendered Flex-like code. Below
    is the example I used:
    var editArguments:Object = {};
    editArguments.Argument1 = 'my first argument';
    editArguments.Argument2 = 'my second argument';
    WebService.MyCFC(editArguments);
    When trying this in Flex, I get the following error. I am
    unsure what I am doing wrong and I've Googled and Googled and
    cannot find my answer I am looking for. First of all, is it even
    possible to attempt what I am trying? Thanks!
    faultCode:EncodingError faultString:'Array of input arguments
    did not contain a required parameter at position 1'
    faultDetail:'null'

    any ideas?

  • Passing arguments to a method

    I need to pass an ip address into a method. So I know its type InetAddress. If the IPAddress is 10.100.50.33. how would I pass it in to the method. eg:
    SysNameScanCommand(  )Would it be like this?
    SysNameScanCommand(InetAddress 10.100.50.33 )

    It depends what kind of argument your function is expecting. If it wants a String, you could call
    SysNameScanCommand("10.100.50.33");If it wants an InternetAddress object, then the call would be something like:
    SysNameScanCommand(new InternetAddress("10.100.50.33"));

  • Pasting multiple objects into frame

    Greetings everyone
    I was wondering if someone could shed some light on how to best paste multiple objects into a single frame.
    Mainly, I'm trying to nest objects that form a part of a newspaper article header; since it's a design element that keeps repeating with each single article I don't want to spend time with manually positioning the elements each time--it's time consuming and prone to sloppiness.
    Unfortunately, the base frame will have about three objects that need to be nested within it. Once I paste one object into a frame, the next time I do `Paste into`--the content (previously pasted object in this case) just gets overridden.
    I've read that, to paste multiple objects into a single frame, one should group the objects first. Now this works pretty well for getting them into the frame, but leaves me with no options to position them relative to the frame. I can't move or position an object individually and I have no option to ungroup them once they've been pasted.
    Here's a small mock-up to depict my peculiar predicament:
    Ideally, I'm aiming to have the main header frame to fit the content of the nested objects and for it to be flexible enough that I can quickly span it across multiple columns as per article requirements.

    !kRON wrote:
    For items that are part of the group, their (X,Y) location coordinates are relative to the document--neither to the group nor the parent frame. The group itself has coordinates that are relative to the parent frame (X+ offset, Y+ offset). I can select the group and the parent frame and use the align to selection options. For individual items, I cannot make a selection of both them and the frame, only between items that are part of a group. I loose options to align an individual item relative to the parent frame, which means I have to drag them around and rely on smart guides.
    I've tinkered around some more and it'd appear it's not possible to lay out the elements as I imagined. So I have to resort to grouping the items that would form a frame and pasting them into a frame. If multiple frames have to be members of a single frame I'd have to group the frames and paste them into the single frame and so on.
    Based on my layout mock-up, I'd end up with 3 frames within the header frame:
    Article header
    Heading
    Article type
    Separator
    Article heading
    Title
    Footer
    Author
    Shape
    Based on experience, should I go with this or stick with the old fashined moving around of loose elements? Will it be a lot of work to maintain resizing and repositioning of the various items and their frames once I start changing the width and height of the header frame or will it save me some time?
    I'm not a working designer or production worker, so anything new takes me longer than I think it should, because I don't have a rich reservoir of quick methods at my fingertips.
    Your description above interested me, because I've been wrestling with the annoying limitations of manipulating and adding compound objects in anchored frames. For many situations, it's probably simplest to assemble each iteration of a compound object, that introduces a new element, outside the anchored frame, then group the elements and paste the grouped object into the anchored frame.
    However, the arrangement of elements in your example made me think that a table might be a workable solution. The answer I arrived at is "Yes, it's a solution, but it takes a while to set up." If it's reusable easily, then it might be worthwhile investing in a few experiments.
    I've attached a zipped idml interchange version of the file, and also a PDF.
    Here are some notes:
    * I created a table with three rows and three columns, no header or footer rows. Three columns because I thought I'd paste a vertical line into an inline anchored frame in the center cell of the top row, for the separator line. Later, I realized that defining the vertical cell rule as paper color would suffice, so I merged the two right cells on the top row to create a two-column row, with text in each cell and the vertical separator between them.
    * I merged all three cells on the second row into a single cell.
    * I merged the two right cells on the bottom row, but later, when I moved the cell rule to position the triangular graphic in the inline anchored frame in the right cell, it moved the vertical cell rule in the first row. So, I had to unmerge (or split) the cells, and cut/paste the triangular graphic's anchored frame into the rightmost cell. To position the anchored frame, I moved the vertical cell rule with Shift+Drag, to keep the table width unchanged.
    * I sampled the purple color with the eyedropper tool while cells were selected and the swatch panel was set to fill the selected object.
    * I didn't spend much time matching the type, as you can see. To position the text, I adjusted the cell margins in some cases, and left/right indention in some cases; I'm not sure which is more efficient in situations where there will be different amounts of text to fit. I didn't create cell styles or paragraph styles (BAH! Bad, bad, bad process) because I won't be repeating this stuff, but you probably will benefit greatly from defining styles for your repeating needs.
    * The triangular cut into the bottom row made it easy to manage creating and positioning the graphic. A non-geometrical object might be trickier. The triangle is a text frame, set to negative space above, so it overlaps the cell above it, enough to avoid a black gap.
    * Except for the vertical paper-colored divider line, all the cells have zero-width strokes.
    * I created the table in a text frame, that I fitted down to the size of the table, but I can't remember if I selected, copied, and pasted the text frame into the text flow to anchor it, or if I selected the table in the text frame, copied and pasted it into the flow. Not sure if it makes a difference in work efficiency.
    If I understand your general needs, this should work well for changing text and adjusting the column widths.
    HTH
    Regards,
    Peter Gold
    KnowHow ProServices

  • Export multiple tables into one flat file

    I have data in multiple tables on a processing database that I need to move up to a production database. I want to export the data into a flat file, ftp it to the production server and have another job pick up the file and process it. I am looking for
    design suggestions on how to get multiple tables into one flat file using SSIS?
    Thank You.

    Hey,
    Without a bit more detail, as per Russels response, its difficult to give an exact recommendation.
    Essentially, you would first add a data flow task to your control flow.  Create a source per table, then direct the output of each into an union all task.  The output from the union all task would then be directed to a flat file destination.
    Within the union all task you can map the various input columns into the appropriate outputs.
    If the sources are different, it would probably be easiest to add a derived column task in-between the source and the union all, adding columns as appropriate and setting a default value that can be easily identified later (again depending on your requirements).
    Hope that helps,
    Jamie

  • Self as an input/output argument

    Hi,
    does anyone know if self is a valid argument to a method that defines its
    parameter as input/output?
    The reason I ask is that I am trying to move an application from 2.0.F.2 to
    3.0.C.0, and the TOOL compiler gives me an error that it can't find a
    method with a signature of "x" and it has methods with signatures of "x",
    "y" and "z". The only clue I have is that the compiler advises: "Check that
    any values passed to output or input output parameters are values that can
    be changed like variables or attributes."
    I might add that I personally would not be using self as an argument to
    input output parameters because of my C++ heritage. Passing "this" to a
    member function that might change the value of "this" is not a great idea!
    However, this is the code that I have to work on, warts and all, so any
    help is gratefully received.
    TIA
    Nick.
    Nick James [email protected]
    612/404-4277 or
    Consultant 414/814-3170
    BORN Information Services Group
    Volvo, Video, Velcro - I came, I saw, I stuck around.

    Just out of curiosity,
    What are some other such read-only attributes that are coming with
    R3? That way, those of us still coding in R2 will know to avoid using
    those as output parameters, and thus avoid having our code broken
    when we move to R3.
    Thanks!
    Elias.
    Claremont Technology Group, Inc.
    111 W. Liberty St., Cols, OH 43215
    (614) 628-4891
    [email protected]
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    To: jamesn @ ns.born.com (Nick James) @ internet
    cc: forte-users @ Sagesoln.com @ internet (bcc: Elias Fayyad/Central
    Region/Claremont)
    From: dnelson @ forte.com (Don Nelson) @ INTERNET@WORLDCOM
    Date: 05/27/97 12:48:18 PM CDT
    Subject: Re: self as an input/output argument
    Nick,
    R3 does not allow you to change the value of self. It is now considered a
    read-only variable. Read-only variables may not be passed to methods using
    output parameters. R2 used to, but then the C++ compiler would, of course,
    choke on it.
    It was a convenient way to make the compiler fail if you needed to,
    though....
    Don
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  • Export Multiple tables into a single Excel Sheet

    We have a use case where we need to export multiple tables into an excel sheet. The exportCollectionActionListener only allows one table (which is provided in the exportedId attribute) to be exported into Excel. So is there a method provided by adf to export more that one table into excel ?

    dvohra,
    I need to export multiple tables into a single excel sheet. These links only show how to export a single table to an excel sheet.
    I have tried out this : http://iadvise.blogspot.com/2007/04/export-adf-table-to-excel.html. But i am not getting the popup to save the file. So i can't find out where the file got created.

  • Saving multiple records into text file

    Can I save multiple records into a text file at one go?
    My application has a list of data displayed there and when the user clicks on the save button it will save all the records on the screen.
    It works but it only saves the last record.
    Here are my codes
    // this is to display the list of data
    private JLabel[] subjects=new JLabel[20];
    private JLabel[] subTotal=new JLabel[20];
    private JLabel[] codes=new JLabel[20];
    private JLabel[] getTotal=new JLabel[20];
    String moduleCodes;
    String getPrice;
    double price;
    int noOfNotes;
    public testapp(Subjects[] subList)
    int j=0;
                double CalTotal=0;
              for (int i=0; i<subList.length; i++)
                   subjects[i] = new JLabel();
                   subTotal[i] = new JLabel();
                   codes=new JLabel();
                   getTotal[i]=new JLabel();
                   if (subList[i].isSelected)
                        System.out.println(i+"is selected");
                        subjects[i].setText(subList[i].title);
                        subjects[i].setBounds(30, 140 + (j*30), 400, 40);
                        subTotal[i].setText("$"+subList[i].price);
                        subTotal[i].setBounds(430,140+(j*30),100,40);
                        codes[i].setText(subList[i].code);
                        getTotal[i].setText(subList[i].price+"");
                        CalTotal+=subList[i].price;
                        contain.add(subjects[i]);
                        contain.add(subTotal[i]);
                        j++;
                        moduleCodes=codes[i].getText();                              
                        getPrice=getTotal[i].getText();
                        noOfNotes=1;
    // this is where the records are saved
         public void readRecords(String moduleCodes,String getPrice,int notes)throws IOException
              price=Double.parseDouble(getPrice);
              String outputFile = "testing.txt";
              FileOutputStream out = new FileOutputStream(outputFile, true);      
         PrintStream fileOutput = new PrintStream(out);
              SalesData[] sales=new SalesData[7];
              for(int i=0;i<sales.length ;i++)
                   sales[i]=new SalesData(moduleCodes,price,notes);
                   fileOutput.println(sales[i].getRecord());
              out.close();

    I suggest writing a method that takes a SalesData[]
    parameter and a filename. Example:
    public void writeRecords(SalesData[] data,
    String filename) throws IOException
    BufferedWriter out = new BufferedWriter(new
    FileWriter(filename, true));
    for (int i = 0; i < data.length; i++)
    out.write(data.getRecord());
    out.newLine();
    out.close();
    And it's good to get in the habit of doing things like closing resources in finally blocks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How to set a common page for all users after loging on?

    hi all, Now "My Dashboard" is the default page after logon. i want to set a default home page for all users. users can see the home page after loging on. how to change the default dashboard from "My Dashboard" to "Home page" for all users? thanks, da

  • Never Backedup Library

    iTunes has been working at my computer for the past month, but for some reason it won't open today. I get an error message that says: "iTunes cannot run because some of its required files are missing. Please reinstall iTunes." I haven't backup up my

  • Regarding screen guard issue for xperia z3

    When is the screen guard of xperia z3 coming to india. Iam from visakhapatnam, Andhra Pradesh

  • Adobe Digital 2.0 stopped  working?

    The siolution to Adobe digital 2.0 on Windows 8 is to download the older version 1.7 and you are on. Regards Folahan

  • BB Desktop 7 freezes when it gets to 2190 contacts.

    Can anyone help me out with my desktop manager freezing?  I'm using PC  BB Desktop software version 7.0.0.59 (Bundle 60) and every time it looks at my contacts and gets to 2190, it freezes and shuts down the BB desktop software.  I have around 3000 c