PRB: Problem with SQL Sample with Unrecognized File Types (186377)
The information in this article applies to:
- Microsoft OLE DB Provider for Index Server 2.0
This article was previously published under Q186377 SYMPTOMS
Using the SQL sample that ships with Index Server 2.0 in the Windows NT 4.0
Option Pack, the browser may show formatting problems with some file types
in the results of a query.
CAUSE
If the display results of the query using Sqlqhit.asp include files with
extensions that are unrecognized, Index Server uses the default text
filter. If this file contains HTML, the HTML escape characters are not
properly recognized by the scripting code in the Sqlqhit.asp file. So, the
browser becomes confused and treats these as if they are HTML and this
creates formatting problems.
RESOLUTION
You can fix this problem by adding three lines of code close to the end of
the Sqlqhit.asp file.
The sample code below shows how the last 23 lines of the Sqlqhit.asp file
should appear (the addition is the new If statement in the beginning).
Sample Code
<%else%>
<%if VarType(RS(i)) = 8 then%>
<TD><% = Server.HTMLEncode(RS(i)) %></TD>
<%else%>
<TD><% = RS(i) %></TD>
<%end if%>
<%end if%>
<% Next %>
</TR>
<%
RS.MoveNext
Loop
RS.Close
Conn.Close
Set QUtil = Nothing
%>
</TABLE>
<!--#include file ="is2foot.inc"-->
</BODY>
</HTML>
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
REFERENCES
For more information, refer to the Index Server documentation in the
Windows NT Option Pack documentation.
Modification Type: | Major | Last Reviewed: | 7/19/2001 |
---|
Keywords: | kbprb KB186377 |
---|
|