This topic is locked

List page order

7/27/2009 1:35:01 PM
ASPRunnerPro General questions
J
JimSmiley author

Using Ver 5.2.
I currently have the "List" page showing the data in default mode. I need to show the data by "OrderDate" with the newest orders first. Can I do this without rebuilding the project? I've made so many changes to the code that I don't want to rebuild until I switch to Ver 6.
Thanks;

J
Jane 7/28/2009

Hi,
open and edit generated include/..._variables.asp file for this purpose:

gstrOrderBy="ORDER BY FieldName desc"

J
JimSmiley author 7/29/2009

Thanks Jane, that part works well. Is it possible to have the dates ordered from newest to oldest?

J
Jane 7/30/2009

Just use then same one ORDER BY statement.

J
JimSmiley author 7/30/2009

Just use then same one ORDER BY statement.


Jane;
I'm sorry but I don't understand. This is the code I have:
[codebox]gstrOrderBy="OrderDate"

if len(gstrOrderBy)>0 and lcase(mid(gstrOrderBy,1,8))<>"order by" then gstrOrderBy="order by " & gstrOrderBy[/codebox]
Where do I use the same ORDER BY statement?

J
Jane 7/31/2009

Jim,
check my changes:

gstrOrderBy="OrderDate DESC"

J
JimSmiley author 7/31/2009

Jane;
Thank you for your patience. Everything works now! I really love this software and the support I get via this forum.
Regards;
Jim S