All things are lawful, but not all things are profitable.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Warning: Polygon Object on sheet "Sheet1" not supported - omitting
Warning: Polygon Object on sheet "Sheet1" not supported - omitting
Comes Here1
Connecting to database...
Creating statement Testing 999 ...2015-SE-001
Error1
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2015-SE-001' (id INTEGER not null primary key auto_increment, name varchar(30),' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
at ReadExcelSheetMain4.readExcel(ReadExcelSheetMain4.java:79)
at ReadExcelSheetMain4.main(ReadExcelSheetMain4.java:122)
Warning: Polygon Object on sheet "Sheet1" not supported - omitting
Warning: Polygon Object on sheet "Sheet1" not supported - omitting
Comes Here1
Connecting to database...
Creating statement Testing 999 ...2015-SE-001
Error1 after modifying
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exists2015-SE-001 (id INTEGER not null primary key auto_increment, name varchar(' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1402)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1317)
at ReadExcelSheetMain5.readExcel(ReadExcelSheetMain5.java:84)
at ReadExcelSheetMain5.main(ReadExcelSheetMain5.java:127)
Zulfi Khan wrote:
near 'exists2015-SE-001 (id INTEGER not null primary key auto_increment, name varchar(' at line 1
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Comes Here1
Connecting to database...
Creating statement Testing 999 ...2015-SE-001
Comes Here Testing 110
Zulfi Khan wrote:what is sql injection
Zulfi Khan wrote:Please explain how it can create havoc or what is sql injection or how can i improve?
Zulfi Khan wrote:i have devised this plan to create a separate table for each student. The advantage is that we can check students' attendance with a simple select statement without a where clause. But manual creation of tables is impossible because there are thousands of students, so i am using dynamic technique.
Zulfi Khan wrote:I know one table solution possible but then we have to use complex sql statements
Dave Tolls wrote:I don't see how a WHERE clause is more complex than someone having to remember individual tables.
Paul Clapham wrote:But as soon as you find you need a query which asks for data about more than one student, you're going to regret putting each student's data in a separate table.