Skip to main content



      Home
Home » Newcomers » Newcomers » syntax error on token(s)
syntax error on token(s) [message #46105] Sun, 03 April 2005 12:53
Eclipse UserFriend
Originally posted by: majidnakit2005.gmail.com

Hi I have this code, but I got these errors in lines 12, 13 and 14

error in line 12 says :
syntax error on token(s) misplaced construct(s)
syntax error on token(s)"Invalid Character" , delete this token
syntax error , insert ";" to complete LocatVariableDecrationStatement

error in line 13 says :
syntax error on tokens, delete this token

error in line 14 says :
syntax error on tokens, Expression expected instead
syntax error on tokens, delete this token

1 public boolean validateUser(String username, String password)
2 {
3 boolean valid = false;
4
5 Connection con = null;
6 Statement stmt = null;
7 ResultSet rs = null;
8 try
9 {
10 con = dataSource.getConnection();
11 stmt = con.createStatement();
12 rs = stmt.executeQuery(“SELECT * FROM Users “ +
13 “WHERE username = ‘“ + username +
14 “‘ “ + “AND password = ‘“ + password + “‘“);
15
16 if (rs.next())


Could you please help me.
Thank you.
Previous Topic:building a JAR file
Next Topic:Recommended Eclipse books for Newbies
Goto Forum:
  


Current Time: Thu May 08 03:41:41 EDT 2025

Powered by FUDForum. Page generated in 0.12395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top