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

Collapse
8: Re: xql files don't work (response to 1)
Posted by Richard Hamilton on
You said:

In the tcl file: db_foreach select_states

in the xql file: name="select_item_states"

That isn't going to work.

Remember also that for database specific queries you need an xql file called yourfile-postgresql.xql, though that may not be relevant in your case.

The fully qualified names are not absolutely necessary in your example but they enable you to invoke queries from a namespace other than the default.

Have you correctly set up the page contract and is the page template working ok?

The obvious issue is the naming as shown above. Beyond that I am struggling to find another reason. I suspect it will come down to a missing or spurious character somewhere.

If you have no luck why not take the sample files from the notes application, run one in your application as is, and then substitute your query sql into the xql file without changing the name. If you make only one change at a time you'll find where the problem is.

R.