[ic] Database access within an ActionMap
Mike Heins
interchange-users@icdevgroup.org
Mon Jan 27 09:12:00 2003
Quoting Mark Gibson (gibsonm@cromwell-tools.co.uk):
> On Monday 27 Jan 2003 10:01 am, Mark Gibson wrote:
> > Hi,
> > I'm having problems accessing the database within an ActionMap sub.
> [snip]
> > How can I get a handle on the database from within an ActionMap?
>
> Ah-ha, I've found a work-around for this, calling the [perl] tag with the
> 'tables' attribute set does the trick, example:
>
> ActionMap dostuff <<EOF
> sub {
> $Tag->perl('mytable');
>
> my $db = $Db{mytable};
> ...
> }
> EOF
Neat! I didn't know that would work myself.
I am so used to using Global ActionMap and UserTag things I have put
off figuring out some way to deal with this problem. You have found
a solution.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry