On Sat, 2004-05-01 at 19:53, Tim Bunce wrote: > Here's an updated version of what I'm thinking of with respect > to $sth->more_results (many thanks for the valuable feedback). > > This is quite long because I've tried to consider all the issues.
I'll take some more time to properly read the rest of the document, but I have an initial comment about the types of batches. > =head1 Multiple result sets and the $sth->more_results method > > There are 3 kinds of batches of SQL statements: > > o Arrays of parameters - where an array of values is bound to > placeholders in a single statement. > [This kind of batch is supported via the bind_param_array() and > execute_array() methods and won't be discussed further here.] > > o Explicit Batches - where the $sql passed to prepare() contains > multiple statements separated by semicolons. > > o Procedures - where a procedure that contains multiple statements > is executed AND the database is one that returns the results > from those embedded statements (e.g. Sybase, MS SQL). For Sybase there is no difference between the "explicit batch" and Procedures, and Sybase will not accept semi-colons as statement separators. You can submit almost any combination of T-SQL statements as a batch and have it executed and return results as required, including multiple stored procedure calls, multiple "normal" SQL calls, etc. > Placeholders work as if the entire statement string was a single statement. > If execute() is called with parameter values then the number of values must > match the total number of placeholders in the entire statement string. While not something that DBI should enforce I'll just mention that with Sybase placeholders can ONLY be used for single statement prepares(). I'll try to read through the rest of the document and comment as needed later today, or in the coming days. Michael -- Michael Peppler Data Migrations, Inc. [EMAIL PROTECTED] http://www.peppler.org/ Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.peppler.org/resume.html
