Forum Moderators: open

Message Too Old, No Replies

ASP only returns data for the top 10 records does not go below that

ASP page that calls another ASP page with a unque ID in a database

         

pff_iy

2:33 pm on Jul 23, 2003 (gmt 0)

10+ Year Member



Hi All

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!

defanjos

3:14 pm on Jul 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have "MaxRecords = 10" anywhere on the code? - that would do it.

pff_iy

3:56 pm on Jul 23, 2003 (gmt 0)

10+ Year Member



Hi Defanjos

No I do not!

webdevsf

7:34 pm on Jul 23, 2003 (gmt 0)

10+ Year Member



What does your connection string look like?

pekkle

3:14 pm on Jul 24, 2003 (gmt 0)



hey there...

check to see if you have one of these in your sql queries..

select top 10 columname
from table

gangstah

12:34 am on Jul 25, 2003 (gmt 0)

10+ Year Member



Does this happen on all of your stored procedures?

gangstah

12:35 am on Jul 25, 2003 (gmt 0)

10+ Year Member



Also, what happens when you run the stored proc in Query Analyzer with the same newsID?