%@ Language = VBScript %>
<%Option Explicit%>
<%Response.Buffer = True%>
Learn About Land - News Articles
<%
dim objConnection
dim strCountyName, strArticleName, strArticle, objRS, strSelected, strSQL
dim strSiteName, strArticleLocation, strSQLArticleLocation
dim strAD
strCountyName = Request.Form("CountyName")
strArticleName = Request.Form("ArticleName")
strArticle = Request.Form("Article")
if not IsObject("objConnection") then
set objConnection=Server.CreateObject("ADODB.Connection")
'objConnection.ConnectionTimeout = 15
' objConnection.CommandTimeout = 10
' objConnection.Mode = 3
'objConnectionOpen = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/articlesDB.mdb") & ";"
'adModeReadWrite
if objConnection.state = 0 then
objConnection.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/database/articlesDB.mdb") & ";"
end if
end if
sub FillCountyName()
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT distinct CountyName FROM ArticlesTbl ORDER BY CountyName"
objRS.Open strSQL,objConnection
'Response.Write("" & VBCRLF )
do while not objRS.EOF
if objRS("CountyName") = strCountyName then
strSelected = " Selected "
'strSelected = strCountyName
else
strSelected = ""
end if
Response.Write("" & VBCRLF )
objRS.MoveNext
loop
objRS.Close
set objRS=Nothing
end sub
sub FillArticleName()
if strCountyName <> "" then
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL ="SELECT ArticleName, ArticleDate FROM ArticlesTbl WHERE CountyName='"& strCountyName &"' Order by ArticleDate DESC"
objRS.Open strSQL,objConnection
if objRS.eof then
Response.Write("")
else
'Response.Write("" & VBCRLF )
do while not objRS.EOF
if objRS("ArticleName") = strArticleName then
strSelected = " Selected "
'strSelected = strArticleName
else
strSelected = ""
end if
Response.Write("" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("")
end if
end sub
Sub FillArticle()
'if strCountyName <> "Select a County Name First" AND _
'strArticleName <> "Select Article Name Now" AND strArticleName <>"" then
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT ArticleLocation FROM ArticlesTbl WHERE CountyName='"& strCountyName &"' AND ArticleName='" & strArticleName & "'"
objRS.Open strSQL,objConnection
if objRS.eof then
'Response.Write("")
else
'Response.Write("" & VBCRLF )
do while not objRS.EOF
if objRS("ArticleLocation") = strArticle then
strSelected = " Selected "
'strSelected = strArticle
else
strSelected = ""
end if
Session("selectedRecord") = objRS("ArticleLocation")
' Response.Write("" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
'else
'Response.Write("")
'end if
end sub
%>
<%
Dim Details
Details=""
Details = Trim(Request("WantToRead"))
if StrComp("Details","",1) then
Session("selectedRecord")="http://www.newsobserver.com/104/story/559426.html"
else
Session("selectedRecord")=Details
end if
%>
<%Session("selectedTitle")="Job Gains Boost NC!"%>
<%
objConnection.Close
set objConnection = Nothing
Session.Contents.RemoveAll()
%>