svn commit: r478190 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java

[email protected]
Newsgroups gmane.comp.jakarta.ojb.devel
Message-ID <[email protected]>
Author: arminw
Date: Wed Nov 22 07:21:40 2006
New Revision: 478190

URL: http://svn.apache.org/viewvc?view=rev&rev=478190
Log:
rollback identity column request changes

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java?view=diff&rev=478190&r1=478189&r2=478190
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java Wed Nov 22 07:21:40 2006
@@ -251,13 +251,9 @@
 
     public String getLastInsertIdentityQuery(String tableName)
     {
-        // [email protected]
-        // the function is used by the org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl
-		// this call must be made before commit the insert command, so you
-        // must turn off autocommit by seting the useAutoCommit="2"
-        // or use useAutoCommit="1" or use a connection with autoCommit set false
-        // by default (e.g. in managed environments)
-        // transaction demarcation is mandatory
-        return "values IDENTITY_VAL_LOCAL()";
+        // arminw: Query "values IDENTITY_VAL_LOCAL()" doesn't seems to
+        // work with DB2 Z/os v7 (reported on user-list) thus rollback to
+        // 
+        return "select IDENTITY_VAL_LOCAL() from sysibm.sysdummy1";
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.