Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: 500 Internal Server Errr. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.


Message #1 by "Piragash Moorthi Kanneappan" <rakanpithi@y...> on Mon, 23 Jul 2001 05:57:26
Hello:

I think your syntax for the SQL statement string is the problem.  It 
should read:

ResultSet myResult = stmt.executeQuery("Select * from logKilang where 
idKlg = " + id);

If 'id' is an integer.  If 'id' is a string it should read:

ResultSet myResult = stmt.executeQuery("Select * from logKilang where 
idKlg = '" + id + "'");

String values need to be single quoted in SQL.  Also, you do not put a 
semicolon at the end of SQL statements.




  Return to Index