rs = statement.executeQuery("SELECT * FROM Quiz WHERE SrNo=counterr");
Jump to Post
("SELECT * FROM Quiz WHERE SrNo=counterr")You can't force an undefined variable into the query (typo?). Also, the query will not understand that the
counteris a variable but rather expects it to be an internal keyword in SQL. What you may want is
("SELECT * FROM Quiz WHERE SrNo="+counter)...
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.