int counter;
counter=1;
rs = statement.executeQuery("SELECT * FROM Quiz WHERE SrNo=counterr");
soche123
0
Junior Poster in Training
Recommended Answers
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 thecounter
is 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
Taywin
312
Posting Virtuoso
stpatrck
15
Newbie Poster
soche123
0
Junior Poster in Training
stpatrck
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.