%
'Create database connection
'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../Locadm/location.mdb")
'Set an active connection to the Connection object
adoCon.Open strCon
%>
<%
Dim rsLO
Dim rsLocation 'Database recordset holding the LOID
Dim lngLocationID 'Holds the Loan item ID number
Dim lngbranch
'Read in the ID number of the Location item we are looking at the LO of
If isNull(Request.QueryString("LocationID")) = True Or isNumeric(Request.QueryString("LocationID")) = False Then
Response.Write "Sorry"
Else
lngLocationID = CLng(Request.QueryString("LocationID"))
End If
%>
<%
'Create recorset object
Set rsLocation = Server.CreateObject("ADODB.Recordset")
'Initalise the strSQL variable with an SQL statement to query the database by selecting all tables ordered by the decending date
strSQL = "SELECT tblLocation.* FROM tblLocation WHERE tblLocation.LocationID = " & lngLocationID & ";"
'Query the database
rsLocation.Open strSQL, adoCon
%>