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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manipulating the query recordset programmatically

Status
Not open for further replies.

Thrud

Programmer
Jun 10, 2000
25
0
0
GB
I am working on some internal administration modules for website using ColdFusion Enterprise Server 4.5. <br>There are various search modules displaying query results in a cfgrid (already specified and partially implemented hence cannot switch to cfoutput).<br><br>I want to be able to display selected groups of the records from the query in the cfgrid (ie 1st 20, 20 - 40 etc.). So that I can break large result sets into smaller chunks (using page refreshes and form variables to handle which records are displayed).<br><br>I can do this with cfoutput but cannot see a way to do it with cfgrid. I do not wish anything too complex (such as extracting comma delimited lists to create new temporary queries). <br><br>Any help or advice would be much appreciated.<br><br>Thanks
 
You can set maxrows in your CFQUERY, but that's about it.<br>CFGRID is intended for display entire queries, and as it goes it's a load of rubbish.<br>If you want to be able to go back and forth through sets of records then you will need to either NOT use CFGRID or create a new array on the fly using only the records you want.<br>Take a look at the Query functions in studio for more info.<br><br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
As an aside, I have completely abandoned the use of CFGRID.&nbsp;&nbsp;It has too many quirks and problems for me.<br><br>You can do what you want, but you'll have to programmatically build an intermediate query resultset (using QueryNew() and QuerySetCell()) and feed THAT to CFGRID.
 
Thanks for the feedback. In future I will be using cfoutput to display query results. <br><br>As these modules were already partially implmented using cfgrid, I stuck with it but in these cases it was appropriate to allow the user to search further within the results obtained particularly as they could choose which field to extend the search on.<br><br>Basically though, I agree, cfgrid is not very useful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top