populate table with results of query

Tech-Archive recommends: Fix windows errors by optimizing your registry



I am trying to populate a table with the results of a query, a parameter
of which is passed from a textbox.

But I keep getting the error 'type mismatch'. Can anybody help?

<BODY>

<!-- #include virtual = "include_top.asp" -->
<FORM ACTION = "KempsClassSearch.asp" METHOD = "Post">
<table>
<tr>
<TD>Description:</TD>
<TD><INPUT TYPE = "TEXTBOX" NAME = "Description" maxLength = "30"
SIZE = "40" AUTOCOMPLETE = "OFF"></TD>
</tr>
<tr/>
<tr/>
<tr>
<TD></TD>
<TD ALIGN ="CENTER"><INPUT TYPE = "SUBMIT" VALUE = "Submit"></TD>
</tr>
<tr/>
<tr/>
<tr/>
<tr/>
<tr>
<td>
<%

If (Request("Description") <> "") then

Dim objRS
Set objRs = Server.CreateObject("ADODB.Recordset")

Dim strDescription
strDescription = Request("Description")

objRs.Open "SELECT strKempsClassDescription FROM lkpKempsClass
WHERE strKempsClassDescription LIKE '%" _
& strDescription & "%' ORDER BY strKempsClassDescription",
Application("cnnstrCompanyData"), adOpenStatic, adLockReadOnly,
adCmdText

Response.Write RecToTable(objRS)

objRS.Close
set objRS = Nothing

End If

%>

</td>
</tr>
</table>
</FORM>
<!-- #include virtual = "include_bottom.htm" -->
</BODY>




*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages