Answers
Jan 08, 2009 - 11:28 AM
") Else %>
<%Response.Write("The following Tickets are opened today")%>
<%Do Until result.EOF%> <% Dim ProblemStatusID ProblemStatusID=Request.QueryString("ProblemStatusId") %> <% result.MoveNext loop End If 'Close Database ' objconn.Close %>| <%Response.Write("Problem ID")%> | <%Response.Write("Team Member Name")%> | <%Response.Write("Subject")%> | <%Response.Write("Component")%> | <%Response.Write("Status of the Problem")%> | Edit |
|---|---|---|---|---|---|
| <%Response.write(" " & result("ProblemStatusId") & " ")%> | <%Response.write(" " & result("TeamMemberName") & " ")%> | <%Response.write(" " & result("ProblemTitle") & " ")%> | <%Response.write(" " & result("DepartmentName") & " ")%> | <%Response.write(" " & result("ProblemStatus") & " ")%> | ">Edit |
") Else Response.Write("Edit problem:") result.MoveNext End If 'Close Database ' objconn.Close %>
| DetailsforProblem | ||||||||||||||||||||||||||||||||||||||||
|
Jan 08, 2009 - 02:52 PM
") Else %>
<%Response.Write("The following Tickets are opened today")%>
| DetailsforProblem | ||||
<%Do Until result.EOF%>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>
|
Jan 12, 2009 - 02:51 PM
Search for any details regarding SOST contact form. (% returns all)
[Try 'am' or 'er' for an example]
<% If strSearch <> "" Then ' MapPath of virtual database file path to a physical path. ' If you want you could hard code a physical path here. strDBPath = Server.MapPath("database.mdb") ' Create an ADO Connection to connect to the sample database. ' We're using OLE DB but you could just as easily use ODBC or a DSN. set cnnSearch = Server.CreateObject("ADODB.Connection") ' This line is for the Access sample database: cnnSearch.Open("Provider=SQLOLEDB.1;Password=helpdesk;Persist Security Info=True;User ID=HelpDesk;Initial Catalog=HelpDesk;Data Source=s9DCA3E") ' Build our query based on the input. strSQL = "SELECT a.ProblemStatusId, a.ProblemStatus, e.DepartmentName, c.ProblemTitle, c.ProblemDescription " _ & "FROM (((ProblemsUsersDeptsReps d Inner Join Departments e on d.DepartmentId = e.DepartmentId) Inner Join Problems c on d.ProblemID = c.ProblemID) Inner Join ProblemStatus a on d.ProblemsUsersDeptsRepsId = a.ProblemsUsersDeptsRepsId) " _ & "WHERE a.ProblemStatus = 'CLOSED' " _ & "OR a.ProblemStatusId LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "OR e.DepartmentName LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "OR c.ProblemTitle LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "OR c.ProblemDescription LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "OR a.ProblemStatus LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "ORDER BY a.ProblemStatusId;" ' Execute our query using the connection object. It automatically ' creates and returns a recordset which we store in our variable. Set rstSearch = cnnSearch.Execute(strSQL) ' Display a table of the data in the recordset. We loop through the ' recordset displaying the fields from the table and using MoveNext ' to increment to the next record. We stop when we reach EOF. ' For fun I'm combining some fields and showwing you can do more then ' just spit out the data in the form it is in in the table. %> <% Do While Not rstSearch.EOF %> <% Dim ProblemStatusID ProblemStatusID=Request.QueryString("ProblemStatusId") %> <% rstSearch.MoveNext Loop %>| ProblemID | Department | Title | Description | Status | View |
|---|---|---|---|---|---|
| <%= rstSearch.Fields("ProblemStatusId").Value %> | <%= rstSearch.Fields("DepartmentName").Value %> | <%= rstSearch.Fields("ProblemTitle").Value %> | <%= rstSearch.Fields("ProblemDescription").Value %> | <%= rstSearch.Fields("ProblemStatus").Value %> | ">View |



Add New Comment