I need to copy data into an MSSQLServer 2005 database table which has an identity column.
I've seen how to disable the identity column by executing
SET IDENTITY_INSERT <table> ON
before the insert queries.
How can I do this when I'm using PreparedStatements to do batch inserts and I can't change the statement during the operation?