<% Dim strURL ' The URL of this page so the form will work no matter what this file is named. Dim cnnSearch ' ADO connection Dim rstSearch ' ADO recordset Dim strDBPath ' path to our Access database (/db/*.mdb) file Dim strSQL ' The SQL Query we build on the fly Dim strSearch ' The text being looked for Retreive the URL of this page from Server Variables %> <% strSearch ="90772" %> <% strURL = Request.ServerVariables("URL") strSearch=Trim(strSearch) if strSearch <>"" Then Set cnnSearch = Server.CreateObject("ADODB.Connection") sPath = Server.MapPath("../steam.mdb") cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sPath strSQL = "SELECT * FROM wd " _ & "WHERE br_no LIKE '%" & Replace(strSearch, "'", "''") & "%' " _ & "OR other_no LIKE '" & Replace(strSearch, "'", "''") & "%' " _ & "ORDER BY br_no" & ";" Set rstSearch = cnnSearch.Execute(strSQL) %>
Class Arrangment
<%= RSTSearch.Fields ("class2") %>  <%= RSTSearch.Fields ("Wheel") %> 
Loco Name BR No. WD No.
 <%= RSTSearch.Fields ("loco_name")%>  <%= RSTSearch.Fields ("br_No") %> <%= RSTSearch.Fields ("other_no") %>
Build Details Withdrawal Details Cut / Fate / Preservation Details
<%= RSTSearch.Fields ("builder") %>. <%= RSTSearch.Fields ("mm_build") %>-<%= RSTSearch.Fields ("yy_build") %>.  Build No.<%= RSTSearch.Fields ("build_no") %> (<%= RSTSearch.Fields ("code") %>) <%= RSTSearch.Fields ("last_shed") %>   <%= RSTSearch.Fields ("mm_wdn") %>-<%= RSTSearch.Fields ("yy_wdn") %> <%= RSTSearch.Fields ("cut") %>,  <%= RSTSearch.Fields ("mm_cut") %>-<%= RSTSearch.Fields ("yy_cut") %>
Photograph Copyright ©  anonymous  all rights reserved
  Notes:   
Database-notes: <%= RSTSearch.Fields ("notes") %>
image

<% end if rstSearch.Close Set rstSearch = Nothing cnnSearch.Close Set cnnSearch = Nothing %>