This topic is locked
[SOLVED]

 AddWhere or strWhereClause

10/19/2015 11:27:32 AM
ASPRunnerPro General questions
F
Frank Erik author

I want to list records where "CustomerID = session("UserId").
Using code....

strWhereClause="customerID=" & SESSION("userID") & ""
.... returns the correct number of records as long as I dont use the search function.
The manual suggest using Query.addWhere, but I only get error "missing Object" when trying.......
query.addWhere "customerD='" & SESSION("UserID") & "'"
Need hints!

admin 10/22/2015

Make sure that you use the sample code that applies to your version of ASPRunnerPro. Here are examples for ASPRunnerPro 9.1:

http://xlinesoft.com/asprunnerpro/docs/dynamic_sql_query.htm

F
Frank Erik author 10/23/2015

Finally I understood that AddWhere had to be placed under event, Function AfterTableInit()
Thank you!