Lessons Learned
Lessons Learned
About DMS
Help Desk
Lessons Learned
Fielding
Tactical
Logistics
Library
events

          SEARCH:

<%@ Language=VBScript %> <% ' ' Declare variables. ' Dim objConn ' Declare connection object Dim strCategory ' Variable to hold category search value. Dim strCriteria ' Variable to hold abstract search value. Dim strWhere ' Where clause for the select Dim previous_category ' Used to identify the point when - Dim current_category ' categories change. Dim Author ' Variable to hold author field Dim Contact ' Variable to hold value inside the E_mail database field. Dim E_mail ' Variable to hold possible e-mail address ' ' Init variables ' Session.timeout = 5 strCategory = "" strWhere = "" ' ' Establish connection to the DataBase. ' %> <% 'strCategory = Request.QueryString("strCategory") strCategory = Request("strCategory") strCriteria = Request("Criteria") IF strCategory = "" and strCriteria = "" THEN %> <% ELSE IF strCategory = "*" THEN ' user wants all records to be displayed. strWhere = " " IF strCriteria <> "" THEN strWhere = " WHERE info LIKE '%" & strCriteria & "%'" END IF ELSE ' buid a where clause by first surrounding all selected categories ' with tick marks. strCategory = strReplace(strCategory, ", ", "','", 1, 0) strWhere = " WHERE category IN ('" & strCategory & "') " IF strCriteria <> "" THEN strWhere = strWhere & " AND info LIKE '%" & strCriteria & "%'" END IF END IF ' Extract the information pertaining to the lessons being ' generated. ' sql = "SELECT * " &_ " FROM lessons " & strWhere &_ " ORDER BY category, abstract, dms_version desc, location, author, id" ' Debug statemtns ' Response.Write (sql) ' open a recordset. Set less_rs = Server.CreateObject("ADODB.Recordset") less_rs.Open sql, objConn %>

List of Lessons Learned by DMS personnel.
<% previous_category = "" DO WHILE Not less_rs.eof current_category = less_rs.Fields("category").Value IF previous_category <> current_category THEN Response.Write("Category: " & current_category & "
") END IF %>
Version:<%=less_rs.Fields("DMS_Version").Value%>
Abstract:<%=less_rs.Fields("abstract").Value%>
Author: <% IF IsNull(less_rs.Fields("e_mail").Value) OR _ IsEmpty(less_rs.Fields("e_mail").Value) OR _ less_rs.Fields("e_mail").Value = "" THEN ' There is no e-mails listed in the e_mail field in the ' database. Try to find e-mails embedded inside the author ' memo field. Author = less_rs.Fields("author").Value i = 1 E_mail = Parse_E_Mail(less_rs.Fields("author").Value, i) WHILE E_mail <> "" Author = Hilite_E_Mail(Author, E_mail) i = i + 1 E_mail = Parse_E_Mail(less_rs.Fields("author").Value, i) WEND WriteLN(Author) ELSE ' There is something found in the e-mail field. Display this field ' to the user. Author = less_rs.Fields("author").Value WriteLN(Author) %>
E-mail: <% Contact = less_rs.Fields("e_mail").Value i = 1 E_mail = Parse_E_Mail(less_rs.Fields("e_mail").Value, i) WHILE e_mail <> "" Contact = Hilite_E_Mail(Contact, E_mail) i = i + 1 E_mail = Parse_E_Mail(less_rs.Fields("e_mail").Value, i) WEND WriteLN(Contact) END IF %>
Location:<%=less_rs.Fields("location").Value%>
Date: <%=less_rs.Fields("Entry_date").Value%>
<%=less_rs.Fields("info").Value%>
Return to top

<% previous_category = less_rs.Fields("category").Value less_rs.MoveNext LOOP END IF %>
DMS Logo


Home | About DMS | Fielding | Library | LogisticsTactical | Help Desk
Lessons Learned | Events | Search | Contact | Sitemap | Links

Army DMS Home Page - Copyright 1998, 1999, U.S. Army
Problems? E-mail the Webmaster - By using this site you agree to these specific terms.
There are