Is anything wrong with this part of my code?

Hi all,
I am making a program with lots of methods inside the one class
whenever I call this method it stuffs up... it may be the way I call it or it may be the code is wrong.... could u please tell me if there is an error in the code or if this section is ok?
    public static int seatSearch(String[][] reservation, String target)
        // cycle through the array
        for (int i = 0; i < reservation.length; i++)
            // if the target is found, return the index
            if (reservation[0] == target)
System.out.println("found at [" + i + "][0]");
return i;
// if it finished the loop and still hasn't returned anything
// then return -1 to signal the data wasn't found
System.out.println("the data was not found!");
return -1;
oh yeh... it compiles but when I call it it always returns -1 even when its meant to return the index...
Thanks,
Mike

do some defensive coding and check for nulls,
put some printlnwhat do u mean?
If you have a NullPointer Exception, then your code has a reference variable that does not point to an object.
If the exception comes from the code you posted, either the target variable, the reference variable, or one of the contents of the reference array must be null. To determine which it is, put a System.out.println(target+"\t"+reservation; at the start of the method and put a System.out.println(i+"\t"+reservation[0]); as the first line in the for loop. When your run the code, it will display null somewhere - and that's what you have to fix.
My guess is you have null references in the reservation array and you must decide what to do with those in your code. For exampleif (reservation[0] != null && reservation[i][0].equals(target))

Similar Messages

  • Can someone tell me i did wrong with this part of my code?

    choice = Integer.parseInt (usersChoice);//Math Conversion
         Input = JOptionPane.showInputDialog(null, "How many would you like?[" + Quantity +"]: ");
         price[Quantity] = Float.parseFloat(Input);//conversion from string to int
    JOptionPane.showMessageDialog(null, "You want: " + price[Quantity]);
    for (Quantity=0; Quantity<100;Quantity++)
    When i try to compile i am getting an error "incompatible types" and operator > and ++ cannot be applied to int[],int and int[]

    When i ask a question of my instructor i am lucky if i get a response 48 hrs later, and as for asking my peers, most of them are just as confused as i am. All i am doing is trying to learn i am sorry if you feel that asking on this forum is wrong, but like i said i am attemtping to learn and i figured that who better than to ask then a bunch of people who know Java like the back of their hands.

  • Do you see anything wrong with this GL mapping in a cube?

    hi,
    Can you verify if something is wring with this mapping:
    In model 1:
    0fi_gl_4 --> 0figl_O02 --> 0figl_C02
    the standard cube shows the following key figures and I mapped them to the following fields from the datasource:
    DMSOL(in datasource) to 0Debit_LC (in DSO) to 0Debit (in cube)
    DMHAB(in datasource) to 0Credit_LC (in DSO) to 0Credit (in cube)
    In model 2:
    0fi_gl_6 --> 0figl_C01
    the standard cube shows the following key figures and I mapped them to the following fields from the datasource:
    UMSOL(in datasource) to 0Debit (in cube)
    UMHAB(in datasource) to 0Credit (in cube)
    1. Do you see anything wrong with this mapping? And what is the solution?
    2. What is the problem with the mapping if both cubes sit under the same multiprovider, since 0debit and 0credit are from differnt souce fields?
    thnx

    Hi,
    Thanks for the explanation.
    on #1,
    if my goal is to provide a sort of trial balance, credits and debits as two columns, will it be ok to assume that it should be Local Currency or could it be Document Currency, Local Currency 2 or Local Currency 3? If the latter, then how do I decide?
    on #2,
    i. why will there be difficulty creating a union between the two?
    ii. will there also be an inconsistency if I created 2 separate multiproviders for each model, and create a jump query from the 0fi gl_6 model to 0fi gl_c4 model. If not, why not in this case?
    iii. So, is there any advantage in placing a multiprovider on each of these models separately? i.e. instead of directly reporting off the cubes separately?
    3. I am wondering why in the case of gl_6 (the totals) help.sap recomended to go directly from the datasource to the cube i.e. without DSO in between.
    If without the DSO step is an advantage, what are the advantages?
    And why then do we use DSOs in most model instead? I will appreciate any reasons you may think of..
    Thnx.
    Edited by: AmandaBaah on Jul 28, 2009 11:07 AM
    Edited by: AmandaBaah on Jul 29, 2009 2:25 AM

  • I have purchased a 'adobe font folio 11'. The ci in this font was made. Is there anything wrong with this post copyright if the Web site?

    I have purchased a 'adobe font folio 11'.
    The ci in this font was made.
    Is there anything wrong with this post copyright if the Web site?

    These machines in themselves are usually pretty good, with the occasional aberration. Let's hope you do not have a rogue.
    Looking at the problems there seem to me (as a guess) two problems: incomplete processes and memory. The two may be related. The camera problem I would dismiss as simply that -- batteries run out and the Mac is trying to complete an impossible process: expecting data, data never arrives.
    The Firefox problem may be something external: a badly coded page; something the browser (or Mac) was not equipped to handle (a plug-in for example) and this could put a strain on RAM.
    Maya, I am not familiar with, but it is (if I remember rightly) graphics-oriented and that can be memory intensive).
    Which all comes down to the RAM you bought. Without knowing what it is or where it came from, or your experience in installing it, that in itself could be a problem. You need to make sure that it is properly seated for one thing, that it is the correct type (although the information here suggests that you are on the right track) and that it is OK.
    You might also want to think about posting a crash log here (find these in Console) as someone -- not me -- might be able to pinpoint a cause.

  • Anything wrong with this repo?

    following the beginners guide on wiki, doing the rankmirror
    It says my best option is
    mirror.neotuli.net
    second best is
    homes.umflint.edu
    third is
    ftp.archlinux.org
    4th
    mrrors.easynew.com
    I am in USA, Oklahoma
    any suggestions.

    If it's fast for you with rankmirror, generally choose the order that it gives.
    This great website gives status updates on current mirrors.

  • Anybody see anything wrong with this syntax ?

    I tried to compile the following, but tells me there is an else without an if :
    import javax.swing.JOptionPane;
    class Test {
    public static void main (String[] args) {
    String response;
    int togo = 0;
    response = JOptionPane.showInputDialog ("What is your age?");
    if (response == null)
    JOptionPane.showMessageDialog
    (null, "You clicked on the Cancel button");
    else
    if (response.equals (""))
    JOptionPane.showMessageDialog
    (null, "You must make an entry");
    else
    if ((Integer.parseInt(response)) < 65)
    togo = (65 - (Integer.parseInt(response)));
    JOptionPane.showMessageDialog
    (null, "You have " + togo + " years to go until
    retirement");
    else
    JOptionPane.showMessageDialog
    (null, "You are already able to retire");
    System.exit (0);

    import javax.swing.JOptionPane;
    class Test {
    public static void main (String[] args) {
    String response;
    int togo = 0;
    response = JOptionPane.showInputDialog ("What is your age?");
    if (response == null) {   // -- Whenever you have more than one line of commands, you must enclose your statements with braces
    JOptionPane.showMessageDialog
    (null, "You clicked on the Cancel button");
    } else if (response.equals ("")) { // same problem
    JOptionPane.showMessageDialog
    (null, "You must make an entry");
    } else if ((Integer.parseInt(response)) < 65) {// same problem
    togo = (65 - (Integer.parseInt(response)));
    JOptionPane.showMessageDialog
    (null, "You have " + togo + " years to go until
    retirement");
    } else { // same problem
    JOptionPane.showMessageDialog
    (null, "You are already able to retire");
    System.exit (0);
    } // close that last else statement
    when you have more than one statement for your if i.e.
    if ( condition ) {
    statement 1;
    statement 2;
    } else if ( condition2 ) {
    statement 1;
    statement 2;
    } else {
    hope that this helped

  • Is their anything wrong with this stored procedure?

    CREATE PROCEDURE [dbo].[DeleteAllUserReferences]
    @UserName NVARCHAR(256),
    @Id NVARCHAR(128),
    @Role NVARCHAR(256),
    @RowsAffected int OUTPUT
    AS
    BEGIN TRY
    /*Declare @RowsAffected int;*/
    EXEC aspnet_UsersInRoles_RemoveUsersFromRoles "mainwebsite",@UserName,@Role
    EXEC aspnet_Users_DeleteUser "mainwebsite",@UserName,15,@RowsAffected
    DELETE FROM [AspNetUserRoles] WHERE UserId = @Id
    DELETE FROM [AspNetUsers] WHERE UserName = @UserName
    COMMIT TRANSACTION
    END TRY
    BEGIN CATCH
    ROLLBACK TRANSACTION
    END CATCH
    RETURN 0
    I have a stored procedure above which executes fine when I execute it manually but does not when I execute it via asp.net. Only the first statement executes and the rest does not. Is their anything that might not be proper SQL in this code causing it to stop
    functioning properly?
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

    Since I don't know anything about the contents in that procedure I cannot comment on it. But if an error occurred, you would be taken the CATCH block and the error would be reraised.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Here's the code you requested:
    CREATE PROCEDURE [dbo].aspnet_Users_DeleteUser
    @ApplicationName nvarchar(256),
    @UserName nvarchar(256),
    @TablesToDeleteFrom int,
    @NumTablesDeletedFrom int OUTPUT
    AS
    BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT @UserId = NULL
    SELECT @NumTablesDeletedFrom = 0
    DECLARE @TranStarted bit
    SET @TranStarted = 0
    IF( @@TRANCOUNT = 0 )
    BEGIN
    BEGIN TRANSACTION
    SET @TranStarted = 1
    END
    ELSE
    SET @TranStarted = 0
    DECLARE @ErrorCode int
    DECLARE @RowCount int
    SET @ErrorCode = 0
    SET @RowCount = 0
    SELECT @UserId = u.UserId
    FROM dbo.aspnet_Users u, dbo.aspnet_Applications a
    WHERE u.LoweredUserName = LOWER(@UserName)
    AND u.ApplicationId = a.ApplicationId
    AND LOWER(@ApplicationName) = a.LoweredApplicationName
    IF (@UserId IS NULL)
    BEGIN
    GOTO Cleanup
    END
    -- Delete from Membership table if (@TablesToDeleteFrom & 1) is set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
    DELETE FROM dbo.aspnet_Membership WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_UsersInRoles table if (@TablesToDeleteFrom & 2) is set
    IF ((@TablesToDeleteFrom & 2) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_UsersInRoles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Profile table if (@TablesToDeleteFrom & 4) is set
    IF ((@TablesToDeleteFrom & 4) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_Profile WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_PersonalizationPerUser table if (@TablesToDeleteFrom & 8) is set
    IF ((@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Users table if (@TablesToDeleteFrom & 1,2,4 & 8) are all set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (@TablesToDeleteFrom & 2) <> 0 AND
    (@TablesToDeleteFrom & 4) <> 0 AND
    (@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT UserId FROM dbo.aspnet_Users WHERE @UserId = UserId)))
    BEGIN
    DELETE FROM dbo.aspnet_Users WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    COMMIT TRANSACTION
    END
    RETURN 0
    Cleanup:
    SET @NumTablesDeletedFrom = 0
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    ROLLBACK TRANSACTION
    END
    RETURN @ErrorCode
    END
    Sorry, about the delay. If you think this helps then I will finally be able to finish my stored procedure and move on.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
    suffering - Yoda. Blog - http://www.computerprofessions.co.nr

  • Help: Anything wrong with this spatial query?

    The error messages are as follows:
    SELECT * FROM M_RGSERVERDB1 WHERE sdo_relate(M_RGSERVERDB1.geometry, mdsys.sdo_geometry(2003,NULL,NULL,mdsys.sdo_elem_info_array 1,1003,3),mdsys.sdo_ordinate_array(-97.3 ,35.1 , -97.1 , 35.3)),'mask=COVERS querytype=window') = 'TRUE'
    java.sql.SQLException: ORA-06509: PL/SQL: ICD vector missing for this package
    ORA-06512: at "JZHANG.MD", line 1723
    ORA-06512: at "JZHANG.MDERR", line 8
    ORA-06512: at "JZHANG.SDO_3GL", line 57
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
    a:1681)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1870)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
    538)
    at
    TestSpatial.main(TestSpatial.java:60)
    null

    Hi, Jean-Marc:
    Thanks very much for your help. However, I don't think I missed the parenthesis after I double-checked it-- maybe due to copy/paste.
    In fact, SQLPLUS will remind me if I miss a parenthesis. The following is the SQL that casuse the problem.
    SELECT * FROM M_RGSERVERDB1 WHERE sdo_relate(M_RGSERVERDB1.geometry, mdsys.sdo_geometry(2003,NULL,NULL,mdsys.sdo_elem_info_array (1,1003,3),mdsys.sdo_ordinate_array(-97.3 ,35.1 , -97.1 , 35.3)),'mask=COVERS querytype=window') = 'TRUE';
    Do you have any ideas on version compatibility of 8.1.7 and 8.1.6 which might casue the problem?
    Thanks.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jean-Marc Prevost ([email protected]):
    You have a missing opening parenthesis just after mdsys.sdo_elem_info_array.
    You have:
    mdsys.sdo_elem_info_array 1,1003,3)
    You should have:
    mdsys.sdo_elem_info_array (1,1003,3)
    Hope this helps!<HR></BLOCKQUOTE>
    null

  • Anything Wrong with this query?

    I have been trying to create a report based on this query:
    SELECT call_type.call_type_detail,
    code_city.code_city_detail, area_code.area_code_detail,
    call_reason.call_reason_detail, cform.cform_phone_number_body,
    call_outcome.call_outcome_detail,
    outcome_reason.outcome_reason_detail, cform.cform_date_time ,
    cform.cform_comments
    FROM call_type, code_city, area_code, call_reason, cform,
    call_outcome, outcome_reason
    I have verified all fields to make sure they match and when I
    try to test it CFR crashes...any idea as to why this may be
    happening? Thanks!

    The funny thing is I WAS using inner join already, but didn't
    know it was called that and didn't add it to the post since I have
    quite a few variables as criteria and thought it would make it
    difficult to understand. In the end it was stalling because of an
    error in a table I had not properly specified.
    This is what I had from the start!
    SELECT call_type.call_type_detail,
    code_city.code_city_detail, area_code.area_code_detail,
    call_reason.call_reason_detail, cform.cform_phone_number_body,
    call_outcome.call_outcome_detail,
    outcome_reason.outcome_reason_detail, cform.cform_date_time ,
    cform.cform_comments
    FROM call_type, code_city, area_code, call_reason, cform,
    call_outcome, outcome_reason
    WHERE cform.cform_date_time BETWEEN
    #CreateODBCDateTime(param.CustomFullStartDate)# AND
    #CreateODBCDateTime(param.CustomFullEndDate)# AND
    cform.cform_call_product=#param.GetCustomProduct# AND
    cform.call_service= #param.GetCustomService# AND
    cform.cform_call_reason=#param.GetCustomCallReason# AND
    cform.cform_call_outcome=#param.GetCustomCallOutcome# AND
    cform.cform_call_outcome_reason=#param.GetCustomReason# AND
    call_type.call_type_id=cform.cform_call_type AND
    call_city.call_city_id=cform.cform_call_city AND
    area_code.area_code_id=cform.cform_area_code AND
    call_reason.call_reason_id=cform.cform_call_reason AND
    call_outcome.call_outcome_id=cform.cform_call_outcome AND
    outcome_reason.outcome_reason_id=cform.cform_outcome_reason AND
    cform.cform_date_time

  • What's wrong with this html and css code? ref: Create your first  website tut.

    In reply to David Powers re: design view doesn't translate to browser.  I hope this is the approved way to send copies of code and images.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>cable cars</title>
    <link href="main.css" rel="stylesheet" type="text/css">
    <!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.-->
    <script>var __adobewebfontsappname__="dreamweaver"</script>
    <script src="http://use.edgefonts.net/source-sans-pro:n6:default.js" type="text/javascript"></script>
    </head>
    <body>
    <div id="#wrapper">
      <header id="top">
        <h1>Bayside Beat</h1>
        <nav id="mainnav">
          <ul>
            <li><a href="index.html" class="thispage">Home</a></li>
            <li><a href="sightseeing.html">Sightseeing</a></li>
            <li><a href="eating_out.html">Eating Out</a></li>
            <li><a href="whats_on.html">Whats On</a></li>
            <li><a href="where_to_stay.html">Where to Stay</a></li>
          </ul>
        </nav>
      </header>
      <div id="hero">
        <article>
          <h2>Be  Where It&rsquo;s At</h2>
          <p> </p>
          <p>San Francisco is one of the most exciting and vibrant cities on  the planet. Bayside Beat is here to keep you informed of the best  places to see, where to eat, what to do, and where to lay down your  weary head after an action-packed day—or night—on the town.</p>
        </article>
      <img src="golden_gate.jpg" width="1214" height="547" alt=""/>  </div>
      <article id="main">
        <h2>Riding  the Cable Cars</h2>
        <p> </p>
        <p>No visit to San Francisco is complete without a ride on the iconic  cable cars that climb up the vertiginous hills of the city. Of the  twenty-three lines established between 1873 and 1890, three remain:  two routes from downtown near Union Square to <a href="http://www.fishermanswharf.org/">Fisherman's Wharf</a>, and  a third route along California Street.</p>
        <p> </p>
        <p>The cable cars rely on cables running constantly beneath the  road&rsquo;s surface. The driver—or gripman—uses a lever to grip the  cable to pull the car and its passengers up the hill. The gripman  requires not only great strength, but also great skill. He needs to  know where to release the cable to coast over crossing cables and  points. The conductor works in close cooperation with the gripman,  operating the brake at the rear of the car to prevent it from running  out of control on the downward slopes.</p>
        <img src="cable_car1.jpg" width="400" height="266" alt=""/>
        <figure>
          <p>The cable car terminus near Union Square</p>
    </figure>
        <p> </p>
        <p>Although the cable cars are now mainly a tourist attraction,  they&rsquo;re still used by local commuters to get to and from work. The  California Street line is particularly popular among commuters on  weekdays.</p>
      </article>
      <article id="sidebar">
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <HTML>
        <!--          @page { margin: 2cm }          A:link { so-language: zxx }      -->
        <BODY DIR="LTR">
        <h2>Cable  Car Tips</h2>
        <p> </p>
        <p>A single ride on a cable car costs $6. If you plan to travel  around the city, it&rsquo;s often cheaper to buy a Muni Passport, which  gives you unlimited rides on San Francisco&rsquo;s extensive public  transport system, including the cable cars (but not the <a href="http://www.bart.gov/">BART</a> subway  system). Even a single-day passport ($14) will save you money if you  make a return trip, and stop off to visit Chinatown one way.</p>
        <p> </p>
        <p>There are often long lines at the cable car terminus, particularly  on the Powell-Mason and Powell-Hyde routes. If you don&rsquo;t want to  wait, try walking a few stops along the route. The conductor usually  leaves a small number of places to pick up passengers on the way. The  California Street route is generally less crowded (but not as  spectacular).</p>
      </article>
      <div id="footer">&copy; Copyright Bayside Beat 2013</div>
    </div>
    </body>
    </html>

    Some very strange code that doesn't belong. 
    <article id="sidebar">
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <HTML>
        <!--          @page { margin: 2cm }          A:link { so-language: zxx }      -->
        <BODY DIR="LTR">
    Not sure how that got in there but it is definitely not valid.  Looks like a bad copy & paste from some other document.
    Have you reviewed the fundamentals of HTML5 docs yet?  Knowing the basic structure  will help you more than anything else you can learn at this point. 
    Each page has:
    one DOCTYPE,
    one set of <html> tags,
    one set of <head> tags,
    one set of <body> tags. 
    http://www.w3schools.com/html/html5_intro.asp
      <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Title of the document</title>
    </head>
    <body>
    Content of the document......
    </body>
    </html>   
    Nancy O.

  • What is wrong with this small piece of code?

    Here is the code, it gives a big error that I will post at the bottom. Do any of you know what could be wrong? The ";" in "private JButton[] Invis;" is underlined in red and says: "Syntax error on ";", , expected"
    import java.awt.Container;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JSeparator;
    public class MultButton extends JApplet
         private JButton[] Invis;
         Invis = new JButton[8];
         public void init()
              for(int i = 1; i <= 8; i++)
                   Invis[i] = new JButton("");
                   Invis.setVisible(false);
              Container mW = getContentPane();
              mW.add(Invis[1]); mW.add(Invis[2]); mW.add(Invis[3]); mW.add(Invis[4]);
              mW.add(new JSeparator());
              mW.add(Invis[5]); mW.add(Invis[6]); mW.add(Invis[7]); mW.add(Invis[8]);
    The error:java.lang.Error: Unresolved compilation problem:
         Syntax error on token ";", , expected
         at MultButton.<init>(MultButton.java:8)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Your IDE is being a bit misleading there because the problem is with the next line.
    Anyway. You can do this....
    public class MultButton extends JApplet
         private JButton[] Invis = new JButton[8];
         public void init()
                      // code continues hereOr you can do this
    public class MultButton extends JApplet
         private JButton[] Invis;
         public void init()
                       Invis = new JButton[8];
                       //code continues hereBut you can't do what you were doing.

  • What's wrong with this IF/Else IF code? ASP/VB

    <%
    MarkupAmount = 0;
    IF (rsVOquotes.Fields.Item("price7day").Value) > 0 Then
    IF (rsVOquotes.Fields.Item("price7day").Value) <= 45.99
    Then
    MarkupAmount = rsMarkUps.Fields.Item("upto45").Value
    ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    99.99 Then
    MarkupAmount = rsMarkUps.Fields.Item("from4699").Value
    ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    150.99 Then
    MarkupAmount = rsMarkUps.Fields.Item("from100150").Value
    ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    200.99 Then
    MarkupAmount = rsMarkUps.Fields.Item("from151200").Value
    ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    750.00 Then
    MarkupAmount = rsMarkUps.Fields.Item("from201750").Value
    ElseIF (rsVOquotes.Fields.Item("price7day").Value) >
    750.01 Then
    MarkupAmount = rsMarkUps.Fields.Item("over750").Value
    End IF
    %>
    <input type="hidden" name="TrueAmount"
    value="<%=(rsVOquotes.Fields.Item("price7day").Value+MarkupAmount)%>">
    I'm getting this error:
    Error Type:
    Microsoft VBScript compilation (0x800A0401)
    Expected end of statement
    /addtocartpage.asp, line 619, column 16
    MarkupAmount = 0;
    ---------------^
    Also, in the hidden form field, I'm not sure that the
    calculation in the
    value is correct? Should it not be:
    <input type="hidden" name="TrueAmount"
    value="<%=((rsVOquotes.Fields.Item("price7day").Value)+(MarkupAmount))%>">
    I was given this as a "fix" from the tech support dept. of
    the company whose
    cart extension I've purchased. To be fair to them, it is a
    good extension,
    however they are on US time and don't reply to messages until
    6pm 'ish GMT.
    If anyone can help me out before then, I sure would
    appreciate it. Thanks.
    Regards
    Nath.

    Nath
    You might want to consider using a CASE statement in future
    rather than
    multiple IF statements.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "tradmusic.com" <[email protected]> wrote in
    message
    news:[email protected]...
    > Thank you both.
    > I changed the code they sent me to this:
    >
    > <% MarkupAmount = 0
    > IF (rsVOquotes.Fields.Item("price7day").Value) <=
    45.99 Then
    > MarkupAmount = rsMarkUps.Fields.Item("upto45").Value
    > ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    99.99 Then
    > MarkupAmount = rsMarkUps.Fields.Item("from4699").Value
    > ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    150.99 Then
    > MarkupAmount = rsMarkUps.Fields.Item("from100150").Value
    > ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    200.99 Then
    > MarkupAmount = rsMarkUps.Fields.Item("from151200").Value
    > ElseIF (rsVOquotes.Fields.Item("price7day").Value) <=
    750.00 Then
    > MarkupAmount = rsMarkUps.Fields.Item("from201750").Value
    > ElseIF (rsVOquotes.Fields.Item("price7day").Value) >
    750.01 Then
    > MarkupAmount = rsMarkUps.Fields.Item("over750").Value
    > End IF
    > %>
    > <input type="hidden" name="TrueAmount"
    >
    value="<%=((rsVOquotes.Fields.Item("price7day").Value)+(MarkupAmount))%>">
    >
    > And that seems to have fixed it. I needed to remove the
    first IF, which
    > shouldn't even have been there, and also the semi-colon
    after the 0.
    > Much appreciated, thank you.
    > Regards
    > Nath.
    >
    > "tradmusic.com" <[email protected]> wrote
    in message
    > news:[email protected]...
    >> <%
    >> MarkupAmount = 0;
    >> IF (rsVOquotes.Fields.Item("price7day").Value) >
    0 Then
    >> IF (rsVOquotes.Fields.Item("price7day").Value) <=
    45.99 Then
    >> MarkupAmount = rsMarkUps.Fields.Item("upto45").Value
    >> ElseIF (rsVOquotes.Fields.Item("price7day").Value)
    <= 99.99 Then
    >> MarkupAmount =
    rsMarkUps.Fields.Item("from4699").Value
    >> ElseIF (rsVOquotes.Fields.Item("price7day").Value)
    <= 150.99 Then
    >> MarkupAmount =
    rsMarkUps.Fields.Item("from100150").Value
    >> ElseIF (rsVOquotes.Fields.Item("price7day").Value)
    <= 200.99 Then
    >> MarkupAmount =
    rsMarkUps.Fields.Item("from151200").Value
    >> ElseIF (rsVOquotes.Fields.Item("price7day").Value)
    <= 750.00 Then
    >> MarkupAmount =
    rsMarkUps.Fields.Item("from201750").Value
    >> ElseIF (rsVOquotes.Fields.Item("price7day").Value)
    > 750.01 Then
    >> MarkupAmount =
    rsMarkUps.Fields.Item("over750").Value
    >> End IF
    >> %>
    >>
    >> <input type="hidden" name="TrueAmount"
    >>
    value="<%=(rsVOquotes.Fields.Item("price7day").Value+MarkupAmount)%>">
    >>
    >> I'm getting this error:
    >>
    >> Error Type:
    >> Microsoft VBScript compilation (0x800A0401)
    >> Expected end of statement
    >> /addtocartpage.asp, line 619, column 16
    >> MarkupAmount = 0;
    >> ---------------^
    >>
    >> Also, in the hidden form field, I'm not sure that
    the calculation in the
    >> value is correct? Should it not be:
    >> <input type="hidden" name="TrueAmount"
    >>
    value="<%=((rsVOquotes.Fields.Item("price7day").Value)+(MarkupAmount))%>">
    >>
    >> I was given this as a "fix" from the tech support
    dept. of the company
    >> whose cart extension I've purchased. To be fair to
    them, it is a good
    >> extension, however they are on US time and don't
    reply to messages until
    >> 6pm 'ish GMT. If anyone can help me out before then,
    I sure would
    >> appreciate it. Thanks.
    >>
    >> Regards
    >> Nath.
    >>
    >>
    >>
    >>
    >
    >

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • What's wrong with this SQL?

    what's wrong with this SQL?
    Posted: Jan 16, 2007 9:35 AM Reply
    Hi, everyone:
    when I insert into table, i use the fellowing SQL:
    INSERT INTO xhealthcall_script_data
    (XHC_CALL_ENDED, XHC_SWITCH_PORT, XHC_SCRIPT_ID, XHC_FAX_SPECIFIED)
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N'
    FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION
    SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    I always got an error like;
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT,
    ERROR at line 3:
    ORA-00936: missing expression
    but I can't find anything wrong, who can tell me why?
    thank you so much in advance
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:38 AM in response to: jerrygreat Reply
    For starters, an insert select does not have a values clause.
    HTH -- Mark D Powell --
    PP
    Posts: 41
    From: q
    Registered: 8/10/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:48 AM in response to: mpowel01 Reply
    Even I see "missing VALUES" as the only error
    Eric H
    Posts: 2,822
    Registered: 10/15/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:54 AM in response to: jerrygreat Reply
    ...and why are you doing a UNION on the exact same two queries?
    (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:55 AM in response to: mpowel01 Reply
    Hi,
    thank you for your answer, but the problem is, if I deleted "values" as you pointed out, and then execute it again, I got error like "ERROR at line 3:
    ORA-03113: end-of-file on communication channel", and I was then disconnected with server, I have to relogin SQLplus, and do everything from beganing.
    so what 's wrong caused disconnection, I can't find any triggers related. it is so wired?
    I wonder if anyone can help me about this.
    thank you very much
    jerry
    yingkuan
    Posts: 1,801
    From: San Jose, CA
    Registered: 10/8/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:59 AM in response to: jerrygreat Reply
    Dup Post
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:00 AM in response to: Eric H Reply
    Hi,
    acturlly what I do is debugging a previous developer's scipt for data loading, this script was called by Cron work, but it never can be successfully executed.
    I think he use union for eliminating duplications of rows, I just guess.
    thank you
    jerry
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:03 AM in response to: yingkuan Reply
    Scratch the VALUES keyword then make sure that the select list matches the column list in number and type.
    1 insert into marktest
    2 (fld1, fld2, fld3, fld4, fld5)
    3* select * from marktest
    UT1 > /
    16 rows created.
    HTH -- Mark D Powell --
    Jagan
    Posts: 41
    From: Hyderabad
    Registered: 7/21/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:07 AM in response to: jerrygreat Reply
    try this - just paste the code and give me the error- i mean past the entire error as it is if error occurs
    INSERT INTO xhealthcall_script_data
    (xhc_call_ended, xhc_switch_port, xhc_script_id,
    xhc_fax_specified)
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE'
    UNION
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE';
    Regards
    Jagan
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 11:31 AM in response to: Jagan Reply
    Hi, Jagan:
    thank you very much for your answer.
    but when I execute it, I still can get error like:
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    so wired, do you have any ideas?
    thank you very much

    And this one,
    Aother question about SQL?
    I thought I already told him to deal with
    ORA-03113: end-of-file on communication channel
    problem first.
    There's nothing wrong (syntax wise) with the query. (of course when no "value" in the insert)

  • What's wrong with this IF / ELSE statement? ASP/VBScript

    Hi,
    I'm trying to display a section, within an ASP page, where
    the customer
    logged in is the same as the customer who placed the order,
    identified by
    their "customerID".
    <%IF (rsUser.Fields.Item("customerID").Value) =
    "(rsOrderDetails.Fields.Item("& customerID
    &").Value)" Then%>
    Text etc...
    <%Else%>
    Other text etc...
    <%End IF%>
    The customerID in both database tables is a "bigint" type,
    but when I try
    the above, I get: "Type Mismatch"?
    I've tried this:
    <%IF (rsUser.Fields.Item("customerID").Value) =
    (rsOrderDetails.Fields.Item("& customerID &").Value)
    Then%>
    Text etc...
    <%Else%>
    Other text etc...
    <%End IF%>
    But this also produces a Type Mismatch error.
    Anything glaringly obviously wrong with this? Much
    appreciated.
    Nath.

    Thanks Dooza, that's sorted it.
    Why does ASP not recognise that they are the same format?
    Appreciate the help.
    Regards
    Nath.
    "Dooza" <[email protected]> wrote in message
    news:[email protected]...
    > Ok, it looks like you will need to convert them to the
    same format, even
    > if ASP doesn't think they are the same.
    >
    > <%IF cstr(rsUser.Fields.Item("customerID").Value) =
    > cstr(rsOrderDetails.Fields.Item("customerID").Value)
    Then%>
    > Text etc...
    > <%Else%>
    > Other text etc...
    > <%End IF%>
    >
    > That converts both to a string, which should evaluate
    against each other.
    >
    > See if that helps.
    >
    > Steve
    >
    > tradmusic.com wrote:
    >> Sorry Steve,
    >>
    >> I forgot to remove those from the last example. It
    should have read:
    >>
    >> <%IF (rsUser.Fields.Item("customerID").Value) =
    >> (rsOrderDetails.Fields.Item("customerID").Value)
    Then%>
    >> Text etc...
    >> <%Else%>
    >> Other text etc...
    >> <%End IF%>
    >>
    >> ....which still doesn't work. :o)
    >>
    >> Type Mismatch, yet both fields are bigint.
    >>
    >> Any idea's where the problem is? Much appreciated.
    >> Nath.
    >>
    >>
    >> "Dooza" <[email protected]> wrote in
    message
    >> news:[email protected]...
    >>> tradmusic.com wrote:
    >>>> Hi,
    >>>>
    >>>> I'm trying to display a section, within an
    ASP page, where the customer
    >>>> logged in is the same as the customer who
    placed the order, identified
    >>>> by their "customerID".
    >>>>
    >>>> <%IF
    (rsUser.Fields.Item("customerID").Value) =
    >>>> "(rsOrderDetails.Fields.Item("&
    customerID &").Value)" Then%>
    >>>> Text etc...
    >>>> <%Else%>
    >>>> Other text etc...
    >>>> <%End IF%>
    >>>>
    >>>> The customerID in both database tables is a
    "bigint" type, but when I
    >>>> try the above, I get: "Type Mismatch"?
    >>>>
    >>>> I've tried this:
    >>>>
    >>>> <%IF
    (rsUser.Fields.Item("customerID").Value) =
    >>>> (rsOrderDetails.Fields.Item("&
    customerID &").Value) Then%>
    >>>> Text etc...
    >>>> <%Else%>
    >>>> Other text etc...
    >>>> <%End IF%>
    >>>>
    >>>> But this also produces a Type Mismatch
    error.
    >>>>
    >>>> Anything glaringly obviously wrong with
    this? Much appreciated.
    >>> Whats with this?
    (rsOrderDetails.Fields.Item("& customerID &").Value)
    >>> Why are there ampersands in there?
    >>>
    >>> It should be just this:
    (rsOrderDetails.Fields.Item("customerID").Value)
    >>>
    >>> Steve
    >>

Maybe you are looking for

  • Printing all of file to printer

    I have written some code to print from a file to a printer. The problem is that only the first page prints out and the rest do not. Here's more clarification: Becasue I assume that in a file about 45 lines make up a normal page I am able to get the r

  • How can I retrieve "AIPanelRef" for an Illustrator panel with CS6 SDK?

    I used to get the reference of Swatch panel with the  following code in cs5 sdk        ADMDialogRef dialogRef;        sADMDialogGroup->GetNamedDialog("AdobeSwatch_", &dialogRef); And ADM suite is deprecated in CS6 SDK. I tried to go through all the w

  • Re: ongoing complaint

    we sacked virgin media about 3 months age and payed the £194 cancellation fee their service was always letting us down as usual customer services gave us the usual lies. so it was time to get shut so we signed up to bt, constantly losing connectios,

  • Using multiple img src / with htmlText --display problem

    I need help. I am using multiple <img src /> tag with htmlText and pictures displays in layers(overlay)? html_txt.html = true; html_txt.htmlText = "text<br><img src = ' http://picture1.jpg 'width='500' height='491' hspace='0' /><br>more text<br><img

  • Date column is throwing error in my query.

    select (to_date(((to_char(to_date('6/27/1980','mm/dd/rrrr'),'DD/MM'))||'/' || ((to_char(sysdate,'rrrr'))- (to_char(to_date('6/27/1980','mm/dd/rrrr'),'rrrr')) +(to_char(to_date('6/27/1980','mm/dd/rrrr'),'rrrr')))),'DD/MM/yyyy')) current_dob from M_CUS