org.dbunit.ext.mssql
Class InsertIdentityOperation
java.lang.Object
org.dbunit.operation.DatabaseOperation
org.dbunit.operation.AbstractOperation
org.dbunit.ext.mssql.InsertIdentityOperation
- Direct Known Subclasses:
- InsertIdentityOperation
- public class InsertIdentityOperation
- extends AbstractOperation
This class disable the MS SQL Server automatic identifier generation for
the execution of inserts.
If you are using the Microsoft driver (i.e.
com.microsoft.jdbc.sqlserver.SQLServerDriver
), you'll need to
use the SelectMethod=cursor
parameter in the JDBC connection
string. Your databaseUrl would look something like the following:
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod=cursor
Thanks to Jeremy Stein how have submited multiple patches.
- Since:
- Apr 9, 2002
- Version:
- $Revision: 1.5 $
- Author:
- Manuel Laflamme, Eric Pugh
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_IDENTITY_COLUMN_FILTER
public static final java.lang.String PROPERTY_IDENTITY_COLUMN_FILTER
- See Also:
- Constant Field Values
INSERT
public static final DatabaseOperation INSERT
CLEAN_INSERT
public static final DatabaseOperation CLEAN_INSERT
REFRESH
public static final DatabaseOperation REFRESH
InsertIdentityOperation
public InsertIdentityOperation(DatabaseOperation operation)
- Creates a new InsertIdentityOperation object that decorates the
specified operation.
execute
public void execute(IDatabaseConnection connection,
IDataSet dataSet)
throws DatabaseUnitException,
java.sql.SQLException
- Description copied from class:
DatabaseOperation
- Executes this operation on the specified database using the specified
dataset contents.
- Specified by:
execute
in class DatabaseOperation
- Parameters:
connection
- the database connection.dataSet
- the dataset to be used by this operation.
- Throws:
DatabaseUnitException
java.sql.SQLException
Copyright © 2002-2004 DbUnit.org. All Rights Reserved.