Forum Moderators: open
I wonder if someone out here can shed some light on an issue that I am having. I think I will have to describe this with an example code. So therefore I am sorry if it becomes long winded!
I have a page that has all predated articles that are archived this page has only the headings and calls another page that then provides content for the chosen article. The call is made by having the code below.
Response.Write "<A style='text-decoration: none'HREF=http://www.somewebsite.com/newsitem.asp?news="
Response.Write objRec("newsID")
newID is the ID given to an article on my database and calls the page newsitem.asp the code for which is shown below
news = cint(Request.QueryString("news"))
Dim objRec1 'recordset object
Set objRec1 = Server.CreateObject ("ADODB.Recordset")
objRec1.Open "newsiten", strConnect, adOpenKeyset,adLockReadOnly, adCmdTable
objRec1.MoveFirst %>
<%While Not objRec1.EOF%>
<%
newsID = objRec1("newsID")
If newsID = news Then %>
<% Response.Write objRec1("Title")
Response.Write objRec1("Maintext")
objRec1.MoveNext
Wend
%>
<%
objRec1.Close
Set objRec1 = Nothing
The issue I have is that this method only retrieves the top ten records and will treat anything under that as record not found.
Has anyone else come across this? if so how did you solve.
Thanks in advance for staying with me this long!
check to see if you have one of these in your sql queries..
select top 10 columname
from table