On Fri, 11 Oct 2002 14:35:18 -0700 (PDT) Naveen Prabhakar <[EMAIL PROTECTED]> wrote:
> This is probably a begginers question. > using db2:dbi > when executing a dynamic query,is there a way to print > the query and values for which the execute failed. > > I am trying to bind a number of fields and am > inserting a number of records and would like to know > for which record the execute failed and the values for > which it failed.Could anyone guide me regarding > this.Thanks Since you had to have the text of the SQL to prepare it, you already had the SQL statement, likewise the most recent values sent to bind variables. Just keep them in a variable or variables that your error handler can get to. If you have a new enough DBI, there are also database and statement handle attributes with that information. In the fine manual (perldoc DBI) look for ShowErrorStatement, Statement, and ParamValues. See http://xmlproj.com/fom-serve/cache/49.html for how to read the fine manual. -- Mac :}) Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
