I can't seem to get the code right to bring up the file if both conditions
are met. Here is my ASP page. If I use the first SQL code line, I get "No
Records found" If I use the remmed out lines, I get this error:
Type mismatch: '[string: "SELECT * FROM [Compl"]'

<%

Set conn = Server.CreateObject("ADODB.Connection")
conn.open "System Files"

%>
<%
Set RS = conn.Execute ("SELECT * FROM Complete WHERE filename = ' &
txtfilename & ' AND ApplicationName= ' & txtappname & ' ")
'Set rs = Server.CreateObject("ADODB.Recordset")
'sql = "SELECT * FROM [Complete]" &_
'"WHERE FileName= '" & Request.Form("txtfilename")& "'" and
"ApplicationName= '" & Request.Form("AppName")& "'"
'rs.Open sql,conn,3,3
%>
<%
If rs.bof and rs.eof then %>
<h2 align="center">No match was found</h2>
<%else%>
<%if not rs.BOF then%>
<hr size="5">
<table width="476" border="0" cellspacing="2" cellpadding="2" align="CENTER"
style="font-size: x-small; font-family: fantasy;">
<tr>
<td><b>File Name</b></td>
<td><b>Destination Folder</b></td>
<td><b>Date of File</b></td>
<td><b>Version Number</b></td>
<td><b>Application Name</b></td>
</tr>
<tr></tr>
<tr>
<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<td><%=rs("FileName")%></td>
<td><%=rs("Destination Folder")%></td>
<td><%=rs("DateofFile")%></td>
<td><%=rs("Version Number")%></td>
<td><%=rs("ApplicationName")%></td></tr>
<%
rs.MoveNext
loop%>
<%end if%>
<%end if%>
</table>
</BODY>
</HTML>