I am getting an expected end error on this page:
http://www.jalc.org/RR/index.asp I am NOT, however getting the same error on any of the other asp pages where I have placed this code. Any assistance would be most appreciated.
http://jalc.org/RR/about_programfaq.asp Here is the code in the HEAD tag:
<%
set cn =server.CreateObject("adodb.connection")
cn.open = MM_connRRCountriesJET_STRING
set rs = cn.execute("select count(*) from countries")
countOfRec = rs(0)
randomize
random_number = int(rnd * countOfRec)+1
rs.close
set rs = nothing
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.CursorLocation = 3
rs.Open "select * from countries", cn, 3,1
if not rs.eof then
rs.PageSize = 1
rs.AbsolutePage = random_number
%>
Here is the code in the BODY tag:
<%
response.write "<span class=""small-caps-2""><B>Country:</B></span> "& rs("Country")&"<BR>"
response.write "<span class=""small-caps-2""><B>Capital:</B></span> "& rs("Capital")&"<BR>"
response.write "<span class=""small-caps-2""><B>Currency:</B></span> "& rs("Currency")&"<BR>"
response.write "<span class=""small-caps-2""><B>Population:</B></span> "& rs("Population")&"<BR>"
response.write "<span class=""small-caps-2""><B>Language:</B></span> "& rs("Language")&"<BR>"
response.write "<span class=""small-caps-2""><B>Religion:</B></span> "& rs("Religion")&"<BR>"
end if
rs.Close
set rs = Nothing
cn.Close
set cn = Nothing
%>