What is  wrong with this java

Hi guys
I have a little experience with java
I have to classes LoginScreen and newUser. LoginScreen calss reads data from text file which is user name and passwords then extracts usernames and load them to Comobox .in the first position of the Comobox I Inserted “Create New Profile” string .When the user click on it another Screen will appear which is instance of the newUser class .And that will allow new user to enter his name and press Ok button to confirm the operation ,then the new Screen will be closed .When that happen I want new user name be inserted into the Combox in LoginScreen.Anybody has any clue why the code below does not work correctly .
import javax.swing.*;
import java.awt.*;
public class newUser extends javax.swing.JFrame {
private String allowed = "abcdefghijklmnopqrstuvwxyz_- ";
LoginScreen loginScreen;
private Dimension loginSize;
/** Creates new form AddnewUser */
public newUser() {
initComponents();
setLocationRelativeTo(null);
loginScreen =new LoginScreen();
private void initComponents() {
setLayout(new FlowLayout());
setSize(300, 100);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("AddNew User");
setResizable(true);
jTextField1 = new javax.swing.JTextField();
loginSize = new Dimension(110, 25);//125
jTextField1.setPreferredSize(loginSize);
this.add(jTextField1);
jButton1 = new JButton("OK");
jButton1.setPreferredSize(loginSize);
this.add(jButton1);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
String addNew = jTextField1.getText();
String passwors1 ="123";
//here when I invoke postAdd in LoginScreen class
loginScreen.postAdd(addNew,passwors1);
loginScreen.setEnabled(true);
private javax.swing.JButton jButton1;
private javax.swing.JTextField jTextField1;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;
public class LoginScreen extends javax.swing.JFrame {
private ArrayList<String> newUser = new ArrayList<String>();
private Dimension loginSize;
String choice="";
/** Creates new form LoginScreen */
public LoginScreen() {
initComponents();//**
setLocationRelativeTo(null);
initProfiles();
private void initComponents() {//**
setLayout(new FlowLayout());
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setSize(300, 100);
loginSize = new Dimension(110, 25);
jComboBox1 = new javax.swing.JComboBox();
jComboBox1.setPreferredSize(loginSize);
jButton1 = new javax.swing.JButton("OK");
jButton1.setPreferredSize(loginSize);
this.add(jComboBox1);
this.add(jButton1);
jComboBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox1ActionPerformed(evt);
jButton1.setText("OK");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
* Extracts the profiles from the profile.txt file and inputs them within the combo box.
* Called from the constructor of this class.
void initProfiles()
try {
File f = new File("c:\\JavaPrjImplemention\\javaProject\\profiles.txt");
Scanner filein;
filein = new Scanner(f);
newUser.add("Create New Profile");
while (filein.hasNext())
String temp = filein.nextLine();
newUser.add(temp);
filein.close();
jComboBox1.insertItemAt(newUser.get(0), 0);
for (int i = 1; i < newUser.size(); i++)
{    if(!(newUser.get(i).charAt(0) == '*'))
jComboBox1.insertItemAt(newUser.get(i), (i+1)/2);
catch (FileNotFoundException ex)
Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
//here when I inserted the new user to the combox
void postAdd(String addNew ,String addPassword) {
try
newUser.add(addNew);
String password='*'+addPassword;
newUser.add(password);
int len = newUser.size()/2 ;
jComboBox1.insertItemAt(addNew,len);
PrintWriter filepw;
filepw = new PrintWriter("c:\\JavaPrjImplemention\\javaProject\\profiles.txt");
for (int i = 1; i < newUser.size(); i++)
filepw.println(newUser.get(i));
filepw.close();
catch (FileNotFoundException ex)
Logger.getLogger(LoginScreen.class.getName()).log(Level.SEVERE, null, ex);
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
JComboBox cb = (JComboBox)evt.getSource();
choice = (String)cb.getSelectedItem();
//here new user will be allwoed to enter
//his name by invoking newUser calss
if (choice.equals("Create New Profile"))
newUser addNewuser=new newUser();
addNewuser.setVisible(true);
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new LoginScreen().setVisible(true);
private javax.swing.JButton jButton1;
private javax.swing.JComboBox jComboBox1;
}

1. You have to precisely define "does not work."
2. You have to use code tags to make your code readable. Re-paste it from the original source (not from you post here), highlight it, and clicke the CODE button above the message entry box.

Similar Messages

  • What is wrong with this Java class and method?

    Created a managed bean and following method as shown below.
    public void setEvent(DisclosureEvent disclosureEvent, CoreShowDetail detail) {
    if (disclosureEvent.isExpanded()) {
    detail.setDisclosed(!detail.isDisclosed());
    -- Then integrated above in the following jspx.
    <af:showOnePanel inlineStyle="width:400px;height:300px;"
    binding="#{ShowApanel.showOnePanel1}"
    id="showOnePanel1">
    <af:showDetailItem text="ADF Faces Components"
    binding="#{ShowApanel.showDetailItem3}"
    id="showDetailItem3" disclosureListener="#{ShowApanel.setEvent}">
    <af:panelHeader text="ADF Faces Components First Child"
    binding="#{ShowApanel.panelHeader6}"
    id="panelHeader6"/>
    <af:panelHeader text="ADF Faces Components Second Child"
    binding="#{ShowApanel.panelHeader5}"
    id="panelHeader5"/>
    </af:showDetailItem>
    <af:showDetailItem text="Architecture"
    binding="#{ShowApanel.showDetailItem2}"
    id="showDetailItem2"
    disclosureListener="#{ShowApanel.setEvent}">
    <af:panelHeader text="Architecture First Child"
    binding="#{ShowApanel.panelHeader4}"
    id="panelHeader4"/>
    <af:panelHeader text="Architecture Second Child"
    binding="#{ShowApanel.panelHeader3}"
    id="panelHeader3"/>
    </af:showDetailItem>
    </af:showOnePanel>
    THE ISSUE:[b]
    I am still not able to programmatically disclose or undisclose the panel component.
    Where am I going wrong? Please help.
    Thanks,
    Ruchir

    Hello Frank,
    I put several print statments but none of them is executing on browser. Does this mean that the method is not being called even once?
    public void setEvent(DisclosureEvent disclosureEvent, CoreShowDetail detail) {
    System.out.println("HelloServer Exiting ...");
    if (disclosureEvent.isExpanded()) {
    System.out.println("HelloServer Exiting1 ...");
    // detail.setDisclosed(!detail.isDisclosed());
    System.out.println("HelloServer Exiting2 ...");
    Thanks,
    Ruchir

  • 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 simple code?

    What's wrong with this simple code? Complier points out that
    1. a '{' is expected at line6;
    2. Statement expected at the line which PI is declared;
    3. Type expected at "System.out.println("Demostrating PI");"
    However, I can't figure out them. Please help. Thanks.
    Here is the code:
    import java.util.*;
    public class DebugTwo3
    // This class demonstrates some math methods
    public static void main(String args[])
              public static final double PI = 3.14159;
              double radius = 2.00;
              double area;
              double roundArea;
              System.out.println("Demonstrating PI");
              area = PI * radius * radius;
              System.out.println("area is " + area);
              roundArea = Math.round(area);
              System.out.println("Rounded area is " + roundArea);

    Change your code to this:
    import java.util.*;
    public class DebugTwo3
         public static final double PI = 3.14159;
         public static void main(String args[])
              double radius = 2.00;
              double area;
              double roundArea;
              System.out.println("Demonstrating PI");
              area = PI * radius * radius;
              System.out.println("area is " + area);
              roundArea = Math.round(area);
              System.out.println("Rounded area is " + roundArea);
    Klint

  • What's wrong with this?HELP

    What's wrong with this piece of code:
    clickhereButton.addActionListener(this);
         ^
    That's my button's name.
    Everytime I try to complie the .java file with this code in it it says:
    Identifier expected: clickhereButton.addActionListener(this);
    ^
    Please help.

    You must have that code in a method or an initilizer block... try moving it to eg. the constructor.

  • What's wrong with this code (in recursion there may be a problem )

    // ELEMENTS OF TWO VECTORS ARE COMPARED HERE
    // CHECK WHAT IS WRONG WITH THIS PGM
    // there may be a problem in recursion
    import java.util.*;
    class Test
    Vector phy,db;
    public static void main(String adf[])
         Vector pp1=new Vector();
         Vector dp1=new Vector();
         //adding elements to the vector
         pp1.add("1");
         pp1.add("a");
         pp1.add("b");
         pp1.add("h");
         pp1.add("c");
         dp1.add("q");
         dp1.add("c");
         dp1.add("h");
         dp1.add("w");
         dp1.add("t");
         printVector(dp1);
         printVector(pp1);
         check2Vectors(pp1,dp1);
    public static void printVector(Vector v1)
         System.out.println("Vector size "+v1.size());
         for(int i=0;i<v1.size();i++)
              System.out.println(v1.get(i).toString());
    public static void check2Vectors(Vector p,Vector d)
         System.out.println("p.size() "+p.size()+" d.size() "+d.size());
         printVector(p);
         printVector(d);
         for(int i=0;i<p.size();i++)
                   for(int j=0;j<d.size();j++)
                        System.out.println(" i= "+i+" j= "+j);
                        Object s1=p.elementAt(i);
                        Object s2=d.elementAt(j);
              System.out.println("Checking "+s1+" and "+s2);
                        if(s1.equals(s2))
    System.out.println("Equal and Removing "+s1+" and "+s2);
                             p.remove(i);
                             d.remove(j);
                             printVector(p);
                             printVector(d);                    
                        check2Vectors(p,d);
                   }//inner for
              }//outer for     
    if(p.size()==0||d.size()==0)
    System.out.println("Vector checking finished and both match");
    else
    System.out.println("Vector checking finished and both do not match");
    }//method
    }

    hi,
    but the upper limit is changing everytime you call the function recursively
    so there should not be any problem(i suppose)
    my intension is to get the unmatched elements of the two vectors
    suggest me changes and thanks in advancce
    ashok
    The problems comes from the fact that you remove
    elements for a Vector while iterating in a loop where
    the upper limit as been set to the initial size of the
    Vector.
    You should use so while loops with flexible stop
    conditions that would work when the size of the Vector
    changes.
    Finally: why don't you use Vector.equals() ?

  • Does anybody know what is wrong with my java code?

    Does anybody know what is wrong with my java code?
    --------------------Configuration: <Default>--------------------
    stockApplet.java:47: cannot find symbol
    symbol : variable M_pointThread
    location: class StockApplet
    if (M_pointThread==null)
    ^
    stockApplet.java:49: cannot find symbol
    symbol : variable M_pointThread
    location: class StockApplet
    M_pointThread=new Thread(this);
    ^
    stockApplet.java:50: cannot find symbol
    symbol : variable M_pointThread
    location: class StockApplet
    THE CODE:
    import java.applet.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    public class StockApplet extends java.applet.Applet implements Runnable
    int Move_Length=0,Move_Sum=0;
    String FileName,Name_Str,Content_Date;
    int SP[]=new int[2000];
    int KP[]=new int[2000];
    int JD[]=new int[2000];
    int JG[]=new int[2000];
    int Mid_Worth[]=new int[2000];
    String myDate[]=new String[2000];
    double CJL[]=new double[2000];
    double MaxCJL,MidCJL;
    Label label[]=new Label[10];
    int MaxWorth,MinWorth;
    int x_move0,x_move1,MaxLength=0;
    int x0,y0,X,Y,Record_Num;
    boolean Mouse_Move,Name_Change=true;
    int JX_Five1,JX_Five2,JX_Ten1,JX_Ten2;
    public void init()
    TextField text1=new TextField();
    Thread M_pointThread=null;
    setLayout(null);
    this.setBackground(Color.white);
    this.setForeground(Color.black);
    for(int i=1;i< 10;i++)
    label=new Label();
    this.add(label[i]);
    label[i].reshape(i*80-65,10,50,15);
    if(i==2){label[i].reshape(80,10,70,15);}
    if(i==7){label[i].reshape(510,10,80,15);}
    if(i >7){label[i].reshape((i-8)*490+45,380,70,15);}
    FileName="six";
    Name_Str="six";
    this.add(text1);
    text1.reshape(150,385,70,20);
    text1.getText();
    public void start()
    if (M_pointThread==null)
    M_pointThread=new Thread(this);
    M_pointThread.start();

    Welcome to the forum. I think that George123 has your problem and its solution well in hand. Follow his good advice and you will have solved this problem. One other thing though just for future reference. If you post your code, here, you are going to want someone to be able to read it easily. Please use code tags when posting next time and your code will be much easier on the eye. You can find out about them here:
    http://forum.java.sun.com/help.jspa?sec=formatting

  • What is wrong with this code? on(release) gotoAndPlay("2")'{'

    Please could someone tell me what is wrong with this code - on(release)
    gotoAndPlay("2")'{'
    this is the error that comes up and i have tried changing it but it is not working
    **Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 2: '{' expected
         gotoAndPlay("2")'{'
    Total ActionScript Errors: 1 Reported Errors: 1
    Thanks

    If you have a frame labelled "2" then it should be:
    on (release) {
        this._parent.gotoAndPlay("2");
    or other wise just the following to go to frame 2:
    on (release) {
         this._parent.gotoAndPlay(2);
    You just had a missing curly bracket...

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • What's wrong with this function

    What's wrong with this Function(PL/SQL) in this formaula column definition in Reports 6i
    function currdateFormula return Date is
    curr_date date;
    begin
    select to_char(sysdate, 'DD-MM-YYYY') into curr_date from dual;
    return(curr_date);
    end;
    I get the following error in compiling
    REP-1401. 'currdateformula'.Fatal PL/SQL error occured. ORA-01843 not a valid month.
    The SQL select to_char(sysdate, 'DD-MM-YYYY') from dual; worked well in SQL Plus prompt.
    I got a clean compile when i use just sysdate in the function (see below).
    function currdateFormula return Date is
    curr_date date;
    begin
    select sysdate into curr_date from dual;
    return(curr_date);
    end;
    Appreciate your help
    Raja Lakshmi

    hello,
    what you are trying to do :
    fetch the current date and return it as the result of the formula-column.
    what you are actually doing :
    fetch the current date, convert it to text, assign this text to a date-variable which causes an implicit type-conversion.
    in your case you create a date-string with the format dd-mm-yyyy. the implicit conversion then tries to convert this string back to date using the NLS settings of your session. depending on your NLS_LANG and NLS_DATE_FORMAT this might work, if your session-date-format is dd-mm-yyyy which obviously it is NOT as you get the error.
    what you should do :
    select sysdate into curr_date from dual;
    this fetches the sysdate and stores it in your date-variable. there is no type conversion needed what so ever.
    regards,
    the oracle reports team

  • 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)

  • I HATE my new MACBOOK PRO, it will not let me open any PDF files and I downloaded the ADOBE READER three freaking times and it keeps saying that all the files are corrupt. I would rather have my 2008 Dell at this point. what is wrong with this thing

    I HATE my new MACBOOK PRO, it will not let me open any PDF files and I downloaded the ADOBE READER three freaking times and it keeps saying that all the files are corrupt or damaged. I would rather have my 2008 Dell at this point. what is wrong with this thing

    Perhaps the PDF files are corrupted.
    Hit the command key and spacebar, a blue Spotlight in the upper right hand corner appears, now type Preview and press return on the Preview program.
    Now you can try opening the PDF's from the file menu and see what's going on.
    If they are corrupted, perhaps they are trojans from your Windows PC or gotten from a bad location online.
    Download the free ClamXav and run a scan on the possibly infected folder.

  • What's wrong with this content type definition?

    Could someone tell me what's wrong with this content type definition? When I click "New Folder" in a custom list, it should bring two fields 1) Name 2) Custom Order. However in my case when I click new folder, I see 1) Member (which is totally
    weird) 2) custom order. Where is it getting that Member field from?
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Folder (0x0120) -->
    <ContentType ID="0x012000c0692689cafc4191b6283f72f2369cff"
    Name="Folder_OrderColumn"
    Group="Custom"
    Description="Folder with order column"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{35788ED2-8569-48DC-B6DE-BA72A4F87B7A}" Name="Custom_x0020_Order" DisplayName="Custom Order" />
    </FieldRefs>
    </ContentType>
    </Elements>

    Hi,
    According to your post, my understanding is that you had an issue about the custom content type with custom column.
    I don’t think there is any issue in the content type definition, and it also worked well in my environment.
    Did you have the Member field in the project?
    I recommend you create a simple project only with one custom Order column and one custom Folder_OrderColumn, then you can add more fields one by one.
    By doing this, it will be easier to find out the root cause of this error.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • What's wrong with this Forum? Why does Adobe take so long to reply to posts?!

    What's wrong with this Forum? Why does Adobe take so long to reply to posts?!
    This is actually "specific" to this Photoshop Forum.
    I typically get responses back from other Adobe forum promptly.
    Chime in.

    The Adobe engineering folks DO duck in here from time to time - and that's a BLESSING!  Please name any other big company where you get to interact with the engineers AT ALL.  I can't.  But I suspect the engineers actually have a lot oof real work to do, and their time here is necessarily limited.
    Your comments are more along the line of "I pay a huge amount, for that I expect better support".  These are very valid comments.  But reality is different from what we may expect, and this forum is not the place to expect Adobe support participation AT ALL.  In fact, the technical support people at Adobe often direct users to come here (something I've always found amusing).
    At the higher level, Adobe may simply not be spending enough on support for literally millions of users.  Is is greed or smart business to try to minimize support cost?  That's up for individuals to decide.
    I suggest you write a snail-mail letter to the Adobe president if you're not getting the support you need.
    -Noel

  • What`s wrong with this message "purchase of this item is not currently available"

    what`s wrong with this message “purchase of this item is not currently available”,I test my app with sandbox,it always told me this message from this morning,but it was all right last night.

    This appears to have been resolved over the weekend.  A sandbox status page would be useful.  The sandbox does have frequent problems, resulting in quite a lot of lost development time.

Maybe you are looking for

  • Baseline date control in FB60 with Special GL Indicator

    Good Morning Experts, T Code: FB60 Scenario 1: Post invoice without SGL Ind. Result: Baseline date has been picked authomatically from Posting date. Scenario 2: Post invoice with SGL Ind Result: Baseline date has not been picked. Analysis: The paymen

  • Itunes backup crashed.(but was recovered)

    So my backup drive was failing and i purchased a new drive to transfer all the data over to it. Before I could get the data transferred the drive failed. I used Data Rescue 3 and it has recovered all the files. The thing is all the mp3 files play in

  • CRRuntime_12_0.msm and Crystal Reports Server X1 R2 SP2

    I have installed an app onto a server with the CRRuntime merge module in the project setup file. Although I have removed the app no .NET app which loads a crystal report will run on the server. Is there a conflict between the CRRuntime and the Crysta

  • Problem deploying Software InstallationGPO in AGPM 4

    I can create a controlled GPO, Check Out, edit, create a software installation GPO, and CheckIN, When I attempt to Deploy or Check out a second time to edit the GPO I receive the following error: Check Out GPO: Test Application GPO...Failed The overa

  • "ADF Databinding for TopLink" - only one record?

    I went through this tutorial <http://otn.oracle.com/products/jdev/collateral/tutorials/9050/toplinkdatabinding_tut.html> and have successfully run it in the IDE, however, it only ever displays one record -- the paging buttuns don't seem to do anythin