Small SQL problem
I am stacked with what seems to be a very simple problem.
Here is the segment of code I am working on:
fPersonal = request.Form("fPersonalID")
SQL = "SELECT Alias FROM Personal WHERE PersonalID = fPersonal"
set rs = cn.execute(SQL)
if rs.eof then
falias = rs("Alias")
For some reason the code produce the following error:
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/personalWT/wpersonallist_proc.asp, line 61
As you can see, the variable fPersonal takes a numeric value of 5 but
produces an error. When I replace fPersonal by 5 in the code:
SQL = "SELECT Alias FROM Personal WHERE PersonalID = 5"
Last edited by Snookerman; 06-14-2009 at 02:37 PM.
Sorry, guys, I have resolved the issue.
It was really too simple.
The SQL statement should be:
SQL = "SELECT Alias FROM Personal WHERE PersonalID = " & fPersonal