<% Dim cnResources Dim rsResources Dim cmResources Dim x Dim lngRecordCount Dim strCategory Dim bolPTag bolPTag = false set cnResources = CreateObject("ADODB.Connection")'Create Connection Object set rsResources = CreateObject("ADODB.Recordset")'Create Recordset Object set cmResources = CreateObject("ADODB.Command") 'Open Connection object the constants for connections is located in dataconnections.inc file with cnResources .ConnectionString = strCustomer .CursorLocation = adUseClient .ConnectionTimeout = strGlobalConnectionTimeout .Open end with 'Catch errors and display to user if cnResources.State = adStateClosed then Response.Write "

" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "

" Response.Write "

" & L_COMMENTS_CONNECTION_FAILED_TEXT & "

" %> <% Response.End end if with cmResources .ActiveConnection = cnResources .CommandText = "GetResourceLink" .CommandType = adCmdStoredProc .CommandTimeout = strGlobalCommandTimeout .Parameters.Append .CreateParameter("@Lang", adVarWChar, adParamInput, 4, strAbb) set rsResources = .Execute end with if cnResources.Errors.Count > 0 then Response.Write "

" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "

" Response.Write "

" & L_COMMENTS_DATABASE_FAILED_TEXT & "

" %> <% Response.End end if set rsResources.ActiveConnection = nothing if cnResources.State = adStateOpen then cnResources.Close set cnResources = nothing set cmREsources = nothing Dim strPreviousPage strPreviousPage = Request.ServerVariables("SCRIPT_NAME") strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/")) Response.Cookies("Misc")("PreviousPage") = strPreviousPage %>

<% = L_RESOURCESTITLE_TEXT %>

<% if rsResources.State = adStateOpen then if rsResources.RecordCount > 0 then rsResources.MoveFirst do while rsResources.EOF = false if len(strCategory) < 1 or trim(strCategory) <> trim(rsResources("Category")) then 'if bolPTag then Response.Write "

" strCategory = rsResources("Category") Response.Write "

" & rsResources("Category") & "

" bolPTag = false else 'Response.Write "

" end if Response.Write "   " & rsREsources("LinkTitle") & "
" 'if trim(strCategory) <> trim(rsResources("Category")) and len(strCategory) > 0 then bolPTag = true 'end if rsResources.MoveNext loop end if end if %>

<% if rsResources.State = adSTateOpen then rsResources.Close set rsResources = nothing %>