You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2003/12/19 19:04:06 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformMsSQLServerImpl.java
thma 2003/12/19 10:04:06
Modified: src/java/org/apache/ojb/broker/platforms
PlatformMsSQLServerImpl.java
Log:
add sequence support for MsServer by Matthias Roth
Revision Changes Path
1.5 +10 -1 db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsSQLServerImpl.java
Index: PlatformMsSQLServerImpl.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsSQLServerImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PlatformMsSQLServerImpl.java 2 Apr 2003 22:56:36 -0000 1.4
+++ PlatformMsSQLServerImpl.java 19 Dec 2003 18:04:06 -0000 1.5
@@ -96,4 +96,13 @@
throw new PlatformException(e);
}
}
+
+ public String getLastInsertIdentityQuery(String tableName)
+ {
+ // matthias.roth@impart.ch
+ // the function is used by the org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl
+ // this call must be made before commit the insert cammand, so you
+ // must turn off autocommit by setting the useAutoCommit="2"
+ return "SELECT @@IDENTITY AS id FROM "+tableName;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org