Forum OpenACS Development: Re: xql files don't work

Collapse
4: Re: xql files don't work (response to 3)
Posted by Iuri Sampaio on
Right Emma,
I was aware about it. I had set up the file to be watched.

Deds,
sorry, wrong paste. i had fixed that before i sent the message. it works in the tcl but not calling the xql file

TCL file
set item_status_options [list]
db_foreach select_states { } { lappend item_status_options [list $state $state $num_items] }

XQL file
queryset
fullquery name="select_states"
querytext

select c.category as state, count(c.category_id) as num_items
from im_categories c,im_conf_items i
where c.category_id = i.conf_item_status_id
group by c.category

/querytext
/fullquery
/queryset

The error i get is bellow.

[24/Jul/2009:22:30:45][2031.3029834672][-conn:openacs::2] Error: GET http://iurix.com:8090/dispatch/equipment/?
referred by "http://iurix.com:8090/dispatch/equipment/";
Database operation "select" failed
(exception NSDB, "Query was not a statement returning rows.")

while executing
"ns_pg_bind select nsdb0 { }"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
invoked from within
"db_exec select $db $full_statement_name $sql"
invoked from within
"set selection [db_exec select $db $full_statement_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec select $db $full_statement_name $sql]

set counter 0
while { [db_getrow $..."
(procedure "db_foreach" line 36)
invoked from within
"db_foreach select_states { } { lappend item_status_options [list $state $state $num_items] }"
("uplevel" body line 130)
invoked from within
"uplevel {
# /packages/intranet-confdb/www/index.tcl