This topic is locked

Multiple records update on load print page

3/26/2007 5:59:28 PM
ASPRunnerPro General questions
U
uros author

Hello,
I would like to know if is possible to update multiple selected records on load print page. Example:

You have a table "print" with fields a,b,c on list page you select only records where a=1. When I click on Printer friendly I would like to see, that for selected records c field is set on 'Y'. Can anyone helps me?
thanks,

Best regards,

Uroš

U
uros author 3/27/2007

Any sugestion????

J
Jane 3/27/2007

Hi,
you can extract where clause in the PrintOnLoad event and then use it in the update query.

Current sql is stored in the SESSION(strTableName & "_sql") variable.
Unfortunately we don't have a ready to go solution for this.

U
uros author 3/29/2007

Hi,
Could you please tell me how to get just where condition from the strSQL. Is this some other variable or should I write a function?
strSQL = SELECT field FROM table WHERE (condition) <- I need just this (condition)
thanks

best regards,

Uroš

Sergey Kornilov admin 3/29/2007

You can parse SQL query manually.
Take a look at AddWhere function in include/commonfunctions.asp file that uses similar approach to get WHERE clause.