Robbie kyodo

Ranch Hand
+ Follow
since May 05, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Robbie kyodo

Hey,
Look at Sun shares right now, of course they want you to retake every 2 years, SCJP is their $$$
but I feel employers will consider job experience as the main factor of employing people
Hi

Would like to know if it is enough to just study the book by osborne for part 1 ?
is there anything miss out from that book for level 1 ?
I've tested the JDBC-ODBC connection, its working fine , its just the SQL command....(i thk)
2003-06-17 10:47:48 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT I
NTO statement.

import java.sql.*;

public class RegisterHandler extends HttpServlet {

public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException {
String url = "jdbc dbc:login";
Connection con;
String compareString;
String name = req.getParameter("name");
String account = req.getParameter("account");
String password = req.getParameter("password");
compareString = "SELECT login_id FROM login-table" +
" WHERE login_id == account)";

PrintWriter out = res.getWriter();
Statement stmt;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection url, "", "");
stmt = con.createStatement();
String INSERT =
"INSERT INTO login-table (login_id ,password ,name) " +
"VALUES (?, ?, ?)";
PreparedStatement pstmt = null;
pstmt = con.prepareStatement(INSERT);
pstmt.setString(1, account);
pstmt.setString(2,password);
pstmt.setString(3,name);
pstmt.executeUpdate();
out.println("<HTML><HEAD><BODY>Successfully Created</BODY></HEAD></HTML>");
//}

stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}
}
14 years ago
Hi

I have a servlet which supposed to update my Access table. My table contains 3 fields :
account,password,name.
I ran below snippets of my servlet and compiler gave me SQL syntax error.
String INSERT ="INSERT INTO login-table (login_id ,password ,name) " + "VALUES (?, ?, ?)";
PreparedStatement pstmt = null;
pstmt = con.prepareStatement(INSERT);
pstmt.setString(1, account);
pstmt.setString(2,password);
pstmt.setString(3,name);

I also tried this SQL format .
stmt.executeUpdate("INSERT INTO login-table " + " (login_id ,password ,name ) " + "VALUES " + "('" + account + "', '" + password + "', '" + name + "');");
Also gave me SQL syntax error
Pls help
14 years ago
anybody has any idea how it looks like ?
So from Jessica view, we should grab a job with or without certification and then get as many certificate as possible to get more $$$
Yeah , anybody care where are the vouchers ? he heeee
it seems that there is a mistake
should be
package A;
It is definately true, look at the new keyword list from KnB book or any other references
Hey
congrat myself and you !!
14 years ago
Hi

Just got it !! Thanks Kathy & Bert for their wonderful book.
Also, would like to thank many kind heart here at JavaRanch, especially Anupam, Giselle, Dan, Vince and the rest !!
My advice is keep doing your mock question until u are ready !
BTW What's next ?
Robbie
SCJP 1.4
14 years ago
A friend told me that, he has called Sun and inquired about SCEA voucher.
They asked if he has done his SCJP.
Anybody verify ?
THks guys phew ...
thanks Yimeng
So y-1 only evaluated during run-time at that point. after that line y is still 3.