ï»?% ActivePage = request.querystring("Page")
if ActivePage = "" then ActivePage = "HomePage" %>
<%
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adLockPessimistic = 2
Const adLockOptimistic = 3
Const adLockBatchOptimistic = 4
Dim strAccessDBPath
Dim varFinalDBPath
varFinalDBPath = "Data\AdamsDatabase.mdb"
strAccessDBPath = Server.MapPath(varFinalDBPath)
Dim dbConn
Dim sql_query
%>
<%
Set dbConn = CreateObject("ADODB.Connection")
dbConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strAccessDBPath & ";Persist Security Info=False;"
%>
<%
sql_query = "SELECT * FROM [Tbl_Webpages] where [Page Title] ='" & ActivePage & "'"
Set recordset = CreateObject("ADODB.Recordset")
recordset.Open sql_query, dbConn, adOpenKeyset, adLockReadOnly
recordset.MoveFirst
Do Until recordset.EOF
PageID = recordset.Fields("Page ID").Value
PageTitle = recordset.Fields("Page Title").Value
PageContent = recordset.Fields("Page Content").Value
PageMetaTitle = recordset.Fields("Meta Title").Value
PageMetaKeywords = recordset.Fields("Meta Keywords").Value
PageMetaDescription = recordset.Fields("Meta Description").Value
if err > 0 then response.write("
Error: could not find requested page in the database. Please check the link and try again.")
recordset.MoveNext
Loop
recordset.Close
Set recordset = Nothing
dbConn.Close
Set dbConn = Nothing %>
<%=PageTitle%> | THOMAS, ARVIN & ADAMS Attorney Law Firm Hopkinsville Kentucky