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!

Access returns maximum 245 records on 1 query?

Status
Not open for further replies.

Byourself

Programmer
Jul 5, 2002
18
0
0
IL
I have a very strange problem...
I have a query which should return all the records from one table. I'm using ADO from my ASP page in order to do this.
I have a weird problem that after 245 records it would stop my whole function and wouldn't throw any error... it'd just stop...
Someone knows about this limitation of returned records? ---------------
"Young and hostile, but not stupid" (Blink 182)
 
There is a MaxRecords properties on the recordset object, you could display it and see if it is set to something.

After your call does the record count show 245.

Response.Write "record count = " & rs.RecordCount
Response.End

You need to define "just stop" a little more. Did you put any debugging displays in the function and at what point.
 
Well,

Recordcount returns -1
I also tried to use maxRecords but it didn't help.

The problem is very unclear... I can't exactly tell what happens after the 245th record...
I can try to explain though:
My function goal is to build an html code as a one big string and then show it to the screen\send it via email\ save it as a file...
So there is one big string which is being built from the beginning to the end of this function.

After my debugging trys, I can tell that after the 245th record, the function exits somehow and returns a null string... and this is after the string contained some text...
It's so weird...
if for example I stop it on the 245th record and return the string it will work just fine...

I hope I made myself clear enough...

Thanks a lot,
Shay
---------------
"Young and hostile, but not stupid" (Blink 182)
 
It appears that it is a problem with building the string not the records returned i.e. size limit on string variable. How many bytes of data from each record is put into the string. Is it a String data type or some other type such as Variant. Does the variable contain an array or are you concatenating the columns from each record into the variable. Are you moving beyond the bounds of the variable somehow - incrementing an index?

Here is one thing to check. Remember a NULL added to any other value becomes a NULL. So. check for nulls before concatenating. nz(myfield,"") this will replace a null with an empty string.
dim var2
set var2 = null
var = var + var2
The final result is null
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top