Forum OpenACS Development: Re: Getting package_id in tcl scripts

Collapse
Posted by Dave Bauer on
Vinod,

I agree. Another point is that the procedure should check if there is an active connection before calling [ad_conn package_id] by calling [ad_conn connected_p]. Tcl procedures should accept a package_id parameter if they need the package_id. Same with user_id. Generally you want to avoid making ad_conn calls in tcl procedures if you can. This isn't always possible, but it makes it a little easier to allow the procedures to be called from a scheduled procedure or in an automated test.