<% Dim curSect, curCat, strCode curSect = Request.QueryString("s") If curSect = "" Then curSect = "0" ' Default value curCat = Request.QueryString("cat") If curCat = "" Then curCat = "2" ' Default value Session("curCat") = curCat Session("curSect") = curSect %> Test
<% = curCatName %> <% = curSectName %>

<% Dim strArgs DBConnectA Set rs = Server.CreateObject("ADODB.Recordset") ' Build argument string rs.Open "SELECT * FROM args WHERE argsnippet = " & Trim(Request.QueryString("id")) & " ORDER BY argSnippetArgNo", connA strArgs = "" If Not rs.EOF Then rs.MoveFirst While Not rs.EOF strArgs = strArgs & rs("argSnippetArgName") rs.MoveNext If Not rs.EOF Then strArgs = strArgs & ", " ' Add comma if there are more args Wend End If strArgs = "(" & strArgs & ")" rs.Close rs.Open "SELECT * FROM snippets WHERE snippetID = " & Trim(Request.QueryString("id")),connA If Not rs.EOF Then %> <% rs.Close rs.Open "SELECT * FROM viewArgs WHERE argSnippet = " & Trim(Request.QueryString("id")) & " ORDER BY argSnippetArgNo",connA If Not rs.EOF Then rs.MoveFirst %> <% While Not rs.EOF %> <% rs.MoveNext Wend End If rs.Close rs.Open "SELECT * FROM viewSnippet WHERE snippetID = " & Trim(Request.QueryString("id")),connA %> <% If Cint(rs("snippetCategory")) = 1 Then strCode = ColorJS(rs("snippetText")) If Cint(rs("snippetCategory")) = 2 Then strCode = ColorVBS(rs("snippetText")) If Cint(rs("snippetCategory")) = 3 Then strCode = ColorHTML(rs("snippetText")) If Cint(rs("snippetCategory")) = 4 Then strCode = ColorCSS(rs("snippetText"),0) %> <% rs.Close rs.Open "SELECT * FROM viewXrefs WHERE xrefFromSnippet=" & Trim(Request.QueryString("id")),connA If Not rs.EOF Then rs.MoveFirst %> <% End If Else Response.Write "No article exists with the given ID." End If %>
<% = Replace(rs("snippetName"),"()",strArgs)%>
 
Arguments
<% = rs("argSnippetArgName") %><% = rs("argSnippetArgDescription") %> (<% = rs("datatypeName") %>)
Returns
<% = rs("snippetReturns") %> (<% = rs("datatypeName") %>)
 
<% = strCode %>
 
Notes
<% = rs("snippetComment") %>
See also
<% While Not rs.EOF %> &cat=<% = curCat %>&s=<% = curSect %>"><% = rs("snippetName") %> <% rs.MoveNext If Not rs.EOF Then Response.Write ", " ' Add a comma if there are more xrefs Wend %>
<% rs.Close Set rs = Nothing DBDisconnectA %>