[asterisk-users] func odbc and mult iquery

voipas voipas at gmail.com
Fri Mar 12 05:55:33 CST 2010


2010/3/10 Tilghman Lesher <tlesher at digium.com>

> On Wednesday 10 March 2010 02:09:54 voipas wrote:
> >   Does asterisk func odbc support multi query? I'm executing stored
> > procedure which returns two tables. With tsql command I can see both
> > tables. But asterisk only shows the first.
> > My database is MSSQL.
>
> Yes, but only in 1.6.0 and above.  You'll need to set mode=multirow in
> func_odbc.conf, and the behavior of func_odbc changes dramatically.  See
> the sample func_odbc.conf for more information.
>
> --
> Tilghman Lesher
> Digium, Inc. | Senior Software Developer
> twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>


Hi,

  I'm using 1.6.0.20 asterisk and also I use multirow. I'm getting data like
this:
 for (x=0; ${x} < ${ODBCROWS}; x=${x} + 1) {
  SET(ARRAY(variable,value)=${ODBC_FETCH(${RESULT})});
  SET(${variable}=${value});
 };

But using this, I can only retrieve first table. How to detect and retrieve
the second table?

Thanks
-- 
Best Regards,
Giedrius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100312/4376bac8/attachment.htm 


More information about the asterisk-users mailing list