Phil, Seems to me a DBD-DB2 driver problem. IBM just released version 0.76
Check out http://www.software.ibm.com/data/db2/perl Hope this will fix your problem otherwise contact IBM. Paul. Phil Estes wrote: > I have several Perl scripts (currently being used under Win2k + ActiveState > + DBI 1.14 / DBD-DB2 0.75) which use DB2 "common table expressions" (WITH > CTE( .. ) UNION ALL .. fullselect ) which have been running just fine for > about 6 months or more now. > > A production DB2 server had to be upgraded to FixPack 9 (this is all DB2 > v6.1), and so I dutifully upgraded my local development machine to Fixpack 9 > as well (I have server + local copy of production data). Now all Perl > scripts work fine until they try and execute() a prepared statement that > includes a common table expression. > > I would love to fault DB2/fixpack 9, but these statements still work fine at > the DB2 CLP, in the Command Window, in Java code via JDBC; only in Perl do > they now fail. I have an older machine that I did not upgrade to Fixpack 9, > and I verified that these same scripts run just fine (still on Fixpack 6, to > be specific). > > So, I have a DB2 tracefile if anyone on this list is interesting in > investigating further--I definitely am at the end of my abilities to see if > it is anything else I have done. I have pared down to a test script that > just connects to the DB, prepares and executes this one query, and > disconnects--still fails 100% of the time. > > Here is DB2's complaint: > DBD::DB2::st execute failed: [IBM][CLI Driver] CLI0125E Function sequence > error. SQLSTATE=HY010 at dbtest.pl line 10. > > Line 10 is of course the execute() function call on the statement handle. > DB2 docs on CLI0125E aren't helpful in any way. > > Query for any interested parties.. > > WITH RPL(parent_id, proc_id, method_id ) AS > (SELECT root.parent_id, root.proc_id, root.method_id FROM procelem > root WHERE root.proc_id = ? AND root.parent_id = -1 > UNION ALL > SELECT child.parent_id, child.proc_id, child.method_id > FROM rpl parent, procelem child WHERE parent.proc_id = > child.parent_id) > SELECT DISTINCT RTRIM(rpl.method_id) FROM RPL > > As I mentioned I have a DB2 tracefile as well if anyone wants to see that as > well. > > Thanks, > Phil > > ------------------------------- > Phil Estes, [EMAIL PROTECTED]
