This is a snippet of the code I am having trouble with
var name =document.StatusReports.empname.value; var query = "Select * From reportForm Where EmployeeName =" + name; alert(query); if(adoRS.Open(query, adoConn, 1, 3));
Name is just a variable that will hold the value of a text box. (this works) if I use alert(query) everything displays nicely:
Select * From reportForm Where EmployeeName = kevin As if the concatenation worked fine. But then If I try to open the connection with that query I get this error:
SCRIPT3600: No value given for one or more required parameters.
As if it didn't recognize the concatenation.
NOTE: IT works wihtout the concatenation. For example if I hardcode a value:
var query = "Select * From reportForm Where EmployeeName = kevin";
But that is not the purpose of course.