Problem about oracle

Statement stmt = con.createStatement();

stmt.executeUpdate("DROP TABLE Students");

stmt.executeUpdate("CREATE TABLE Students" +

"(StdNumber NUMBER primary key, StdName VARCHAR2(20),StdSurname VARCHAR2(20),Courses VARCHAR2(15), Year VARCHAR2(15),Semester VARCHAR2(5), Grades REAL )" );

stmt.executeUpdate("INSERT INTO Students" +

"VALUES (1234,'Sezgin','Zeka','Kimya','2002-2003','I',4.00)" );

ResultSet rs = stmt.executeQuery("SELECT Courses FROM Students WHERE stdNumber = 1234");

while(rs.next())

System.out.println(">>> " + rs.getString("Courses"));

}catch(Exception ex){

System.out.println("Error: " + ex);

}

Dear friend i have a problem about oracle. When i execute this code ( i have only written releated code part about my problem ) there is an error like this: Error: java.sql.SQLException: ORA-00928: missing SELECT keyword

Thanks for your help

[1340 byte] By [--Galatasaraya] at [2007-10-3 2:43:00]
# 1
And the Exception happens where?Of course, you don't know, because you're not printing the stack trace. <_<
CeciNEstPasUnProgrammeura at 2007-7-14 20:31:20 > top of Java-index,Java Essentials,New To Java...
# 2
Can you explain much more. Because i have no idea.Thanks
--Galatasaraya at 2007-7-14 20:31:20 > top of Java-index,Java Essentials,New To Java...
# 3

> Can you explain much more. Because i have no idea.

> Thanks

You know, if you did like every decent programmer does and instead of writing

}catch(Exception ex) {

System.out.println("Error: " + ex);

}

wrote

}catch(Exception ex) {

ex.printStackTrace();

}

then you could see which statement is faulty.

CeciNEstPasUnProgrammeura at 2007-7-14 20:31:20 > top of Java-index,Java Essentials,New To Java...
# 4
Thank you very much. I have had an syntax error in oracle. But now with your reply, i have solved.solution is : stmt.executeUpdate("INSERT INTO Students VALUES (1234,'Sezgin','Zeka','Kimya','2002-2003','I',4.00)" );
--Galatasaraya at 2007-7-14 20:31:20 > top of Java-index,Java Essentials,New To Java...
# 5
Missing space. I see it now, too. Wouldn't have found it if I hadn't known what to look at.
CeciNEstPasUnProgrammeura at 2007-7-14 20:31:20 > top of Java-index,Java Essentials,New To Java...