1

i have one parameter that i am passing from a JSP using Ajax which is:

keyword_name;

i have tested to see if their was something in the parameter, their was:

apple

the code below is my ResultSet:

ResultSet rs = stmt.executeQuery("Select keyword_name from keywords                   where keyword_name="+keyword_name+""); 

and the below is the printing of the result set:

while(rs.next()){
buffer=buffer+"<tr><td>"+rs.getString("keyword_name")+"</td></tr>";  
}

Full ERROR code:

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. 

Any ideas!!

1

1 Answer 1

1

Shouldn't that be

<..> where keyword_name='"+keyword_name+"'"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.