Forum Moderators: open
<body onload="document.form1.swname.value=document.form1.option1.options[document.form1.option1.selectedIndex].value">
<form method="post" enctype="multipart/form-data" action="Insert_data.asp" name=form1 onSubmit="return checkEmail(this)">
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><b>Item</b></td>
<td><b>Entries</b></td>
</tr>
<tr>
<td>Software Owner :</td>
<td><input name="ownername" size="40" ></td>
</tr>
<tr>
<td>Software Email :</td>
<td><input name="owneremail" size="40" ></td>
</tr>
<tr>
<td>Software name :</td>
<td><input name="swname" size="18">
<input type="submit" name="Submit2" id="Submit3" value="Find"></td>
</tr>
<%
If Request.Form("Submit2") = "Find" Then
description = Request.Form("swname")
set rs=Server.CreateObject("ADODB.Recordset")
sql= "select id,description from standard_sw where description like '" & description & "%'" &_
" union " &_
" select id,name from legacy_sw where name like '" & description & "%'"
rs.Open sql,connStr
response.write "<select id='option1' size='1' name='option1' onchange='this.form.text1.value=this.options[this.selectedIndex].value'>"
while not rs.EOF
response.write("<option value='")
response.write(rs.fields("description"))
response.write("'")
if rs.fields("description")= description then
response.write("selected")
end if
response.write(">")
response.write(rs.fields("description"))
response.write("</option>")
rs.MoveNext
wend
response.write "</select>"
rs.Close
set rs=Nothing
End if
%>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Submit" id=submit1 name=submit1 onclick="verify();"></td>
</tr>
</table>
</form>
</body>
</html>
How many rows are you returning in your recordset? If it's too many, you may be hitting a timeout on return. You could try to shrink the number of rows that you are returning and see if that helps. Another way to test out whether your sql statement is the culprit is to execute it on the database itself.
A way to extend the scripttimeout is to put a tag like this in the page:
<% Server.ScriptTimeout = 3600 %> -=casey=-