-
Easy syntax question...
With the given Java code:
PreparedStatement ps = con.prepareStatement("SELECT userCode FROM accounts WHERE userCode = ?");
ps.setString(1, code);
ResultSet rs = ps.executeQuery();
...where 'code' is a string, I am getting the following error at compile time: 'Too few parameters. Expected 2.'
I think my syntax is correct. Can anyone tell me why I am getting this error?
Thank you.
Scott
-
Alright, nevermind. I forgot to add an 's' to the end of my field name 'userCodeS'. Man, I hate when i forget stupid things like that.