<FORM ACTION="cities.asp">
Enter search word or word part:<BR>
<INPUT TYPE="TEXT" NAME="CRITERIA" VALUE="<% = Request("Criteria") %>">
<INPUT TYPE="SUBMIT" NAME="Search" VALUE="Go">
</FORM>
<%
' Build connection string to aspgrid.mdb
strConnect = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("..\db\aspgrid.mdb")
' Create instance 2 of AspGrid for the Employees table
Set Grid = Server.CreateObject("Persits.Grid")
' Connect
Grid.Connect strConnect, "", ""
' Specify SQL statement
Grid.SQL = "select id, name, state from cities"
' Hide identity column
Grid("id").Hidden = True
' Set max number of rows per page
Grid.MaxRows = 6
' Specify location of button images
Grid.ImagePath = "../images/"
' Set Table widths
Grid.Table.Width = 300
Grid.Cols(2).Header.Width = 220
Grid.Cols(3).Header.Width = 80
' Set sorting
Grid.ColRange(2, 3).CanSort = True
' Find a record if a search criteria is set
Criteria = Request("CRITERIA")
If Criteria <> "" Then
Grid.Find "name like '" & Criteria & "%'"
End If
Grid.Display
%>