Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordset not returning all the data - size limit?

Status
Not open for further replies.

FrankX

Programmer
Dec 28, 2001
14
US
hi,
I'm getting data from an access database. the data is being turned into a table. one table had 44 rows and returned all of them. one had 66 rows and returned only 61 and the final one had 109 rows but only returned 76.
Is there a size limit on the amount of rows that can be returned, and if there is, is there a way of changing that limit?
Kind regards
FrankX
 
Hi

There may be a timeout on the number of rows that are returned, but absolutely not with your number of rows!

Usually this is down to the query that you are running. Post the code for the query and we can have a look, you may only be asking for those records. Derren
[Mediocre talent - spread really thin]
 
Hi Derren
the whole page is massive, but the relevant bits are:
sub display_the_Goddamn_Table()
set rs = server.createobject("ADODB.Recordset")
sSQL = "Select * FROM [Client Detail];"
rs.open sSQL, "DSN=amssc"
count = 0

do while not rs.eof %>
<CENTER><table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<%if count = 0 then
%><tr><%
bg_color = &quot;#CCFFCC&quot;
for each fld in rs.fields %>
<td height=&quot;1&quot; bgcolor=&quot;<%response.write bg_color%>&quot; > <small><%response.write fld.name %> </small></td>
<%bg_color = colorswap(bg_color)
next
%></tr><%
else
%><tr><%
bg_color = &quot;#CCFFCC&quot;
for each fld in rs.fields %>
<td height=&quot;1&quot; bgcolor=&quot;<%response.write bg_color%>&quot;> <small><%response.write fld %> </small></td>
<%bg_color = colorswap(bg_color)
next
%></tr><%
end if
%><tr><%
bg_color = &quot;#CCFFCC&quot;
for each fld in rs.fields %>
<td bgcolor=&quot;<%response.write bg_color%>&quot;><img src=&quot;images/blocker.gif&quot; width=&quot;90&quot; height=&quot;0&quot;></td>
<%bg_color = colorswap(bg_color)
next
%></tr><%
count=count+1
rs.movenext
loop
%>
</Table></CENTER>
<%
end Sub

function colorswap(sColor)
if sColor = &quot;#CCFFCC&quot; then
colorswap = &quot;#FFCCCC&quot;
else
colorswap = &quot;#CCFFCC&quot;
end if
end function
%>
 
One thing which may be upsetting it on first inspection is that you are writing our a new table header for every record, but only closing the header once. Move the
Code:
<CENTER><table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
to before the while loop. This could be why the vrowser is hiding certain records - it is running out of steam. Derren
[Mediocre talent - spread really thin]
 
Hi Derren,
I moved the header row to before the loop. I've moved the spacer row to the end of the loop. which makes my table line up properly. but the problem turned out to be a timing issue with other queries that were also running. I have put in a wait sub (just loop through doing nothing a million times) and that seems to have sorted it.
Thanks for the help.
Kind regards
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top