This topic is locked

ListQuery example

2/14/2011 8:46:17 AM
ASPRunnerPro General questions
B
boater21 author

Is there a simple example of how to use the ListQuery event? The documentation lists the parameters, but not how to use them. I'm very experienced with SQL, but can't figure out how to put the SQL I need in the listquery event.
Thanks!

T
Tim 2/17/2011

First, I assume you know the list page is generated from the query on the "Query" tab. Then, I'm not sure what you're wanting to do, but something I do alot is alter the "Where" statement of that query at run time. I do that by using the "List page: Before SQL query" event and adding something like this:
strWhereClause = whereAdd(strWhereClause,"StaffID='" & Session("UserID") & "'")
Hope that helps. (if not, maybe you could give more detail about what you're trying to do).
Thanks,

Tim