<% fname = Request("firstname") lname = Request("lastname") depart = Request("department") sortby = Request("SortBy") Dim objConn Dim objRec Dim strConn Dim count TheSQL = "SELECT FNAME, LNAME, EXTENSION, EMAIL, DEPTNAME FROM Employee WHERE FNAME like '" & fname & "%' and LNAME LIKE '" & lname & "%' and DEPTNAME LIKE '" & depart & "%' ORDER BY DEPTNAME;" Set objConn = Server.CreateObject("ADODB.Connection") Set objRec = Server.CreateObject("ADODB.Recordset") objConn.Open strConnect %>
Search :     
Counter Using File
Counter Using DBase
Multiple Submit Buttons
SQL Processor
Table Contents
BookOrdering Application
Employee Directory
Author and Product
Search and FileMaintenance


Main Link Page

Enter your search string in the textbox(es)

Employee Directory

First Name
Last Name
Department
Sort By

<% if Request.Form("SUBMIT1") <> "" Then objRec.Open TheSQL, objConn %>

The search string you entered for FirstName is :<%=fname %> ,LastName is :<%=lname %>, Department is:<%=depart %> and you're sorting by:<%=sortby %>


<% while Not objRec.EOF count = count + 1 Response.Write "" Response.Write "" &"" objRec.MoveNext Wend End If %>

Number of records found : <%Response.write count %>

<% 'objRec.Close set objRec = Nothing %>
"& objRec("FNAME") & "" & objRec("LNAME") & "" & objRec("EXTENSION") &"" & objRec("EMAIL") & "" & objRec("DEPTNAME") & "
" Response.Write "

C++ Tutorial ASP Tutorial Java Tutorial XML Tutorial
Visual Basic And More Javascript doc Flash Tutorial
DeVry University Bronx Community College My Library
Send comments to Support@rrasaq.com