Forum OpenACS Q&A: Re: Getting the SQL from the .XQL

Collapse
Posted by Paul Cannon on
This won't work from the file with the same name as the xql, because db_qd_get_fullname requires a certain level between it and that file. If you do want to use it directly, pass a 0 as the second parameter so that it can uplevel to the right place. Example:

set full_statement_name [db_qd_get_fullname $statement_name 0]
set sql [db_qd_replace_sql $full_statement_name $pre_sql]

Of course, the db_map option is probably a better one.

paul