Is it possible to use Plugin::DBI with nested queries?  If I have an outer query with 
one record, it works quite nicely.  When the outer query returns multiple records, 
things explode.

My code is roughly:

[% USE DBI(...) %]

[% FOREACH master = DBI.query("SELECT id,* ...") %]
  ... 
  [% FOREACH detail = 
       DBI.query("SELECT * ... where detail.masterid = '$master.id'") %]
    ...
  [% END %]
[% END %]

I get (unless the outer query has only one record):
[Tue Mar 25 13:40:21 2003] [error] access to /testcase failed for 127.0.0.1, 
reason: DBI error - execute failed: [Microsoft][ODBC SQL Server Driver]Connection 
is busy with results for another hstmt (SQL-HY000)(DBD: st_execute/SQLExecute 
err=-1)

Is this behavior specific to the ODBC driver or MSSQL?  If not, how are others 
handling this sort of thing?

TIA,
Matt

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to