Forum OpenACS Development: Re: Re: Problem with using db_multirow in <package>-procs.tcl

Posted by Jon Suen on
Thanks for your help.
Are you saying -multirow_name "varname" is defined in a separate code block to the rest?

At the moment my understanding of the syntax for procs generally is:

ad_proc -public processname {
} { Documentation
} {

# Code block (main body for the procedure)

return $args
# for example


Is this correct? I'm just not entirely clear on where
{-multirow_name "varname"}
would fit in, if not within the main body.

I'll give it a go all the same, thanks again.


At present I have:

{ -multirow_name "prs" }

{ upvar $prs prs

db_multirow prs pre_reqs_sql { }

### And I define pre_reqs_sql to return a multirow-ed
### value in the according package-procs.xql file.

This currently spits up a request error:
invalid command name "-multirow_name "prs""

Which I didn't really expect to work all the same, since I'm not sure about the placement of the -multirow_name switch...

Any help would be greatly appreciated