db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformMsSQLServerImpl.java
Date Fri, 19 Dec 2003 18:04:06 GMT
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


Mime
View raw message