dear all,
I'm currently an newbie in classic asp and would like to seek assistant in solving the following problem below:
The search page below, outputs everything in the database instead of specific records.
database records:
name, isin
a1, xs233
b1, xs233
c1, us3355
d1, 3455
for example:
the search page executes all the records in the database instead the desire output should be "records a1 and b1", when entered "xs" in the search text box.
<% 'collect the form input searchInput = Request.QueryString("searchInput") 'check for a match Set myRecordSet = Connect.Execute ("SELECT * FROM dbo.BWIC WHERE isin LIKE '%" & searchInput & "%'") 'display the results if myRecordSet.EOF then response.write("You searched for: " & searchInput & "<br>") response.write("A match was not found.<br>Sorry try again.") else response.write("You searched for: " & searchInput & "<br>") response.write("Records were found!<br>The matches are:<br>") do until myRecordSet.EOF response.write(myRecordSet("name") & "<br>") response.write(myRecordSet("cusip") & "<br>") response.write(myRecordSet("isin") & "<br>") myRecordSet.MoveNext loop end if %><br><br><a href="form_test.asp">Try Again</a>
Any help regarding this issue, would be very much appreciated.
Thank you for your time and help.