[dba-SQLServer] [dba-VB] How I'm approaching the problem

Arthur Fuller fuller.artful at gmail.com
Wed Jul 25 12:23:32 CDT 2007


My computer is a bit wonky currently, not to mention my memory, but I think
that you need to investigate SET IDENTITY INSERT on/off in BOL. It's
something like your theory about the zero'th row. You can force identity
keys in using this. If my exact syntax was wrong, I apologize, but I'm
currently rebuilding this box so only certain things work at the moment.
Hopefully, this will lead you toward a solution.

A.

On 7/24/07, jwcolby <jwcolby at colbyconsulting.com> wrote:
>
> One issue I am running into is that I really want to be able to log the
> start / stop PKID of each record imported.  I use an autoincrement in SQL
> Server, but I do not know how to get at the last PKID in these values
> "live"
> as the SQLBulkInsert runs.  Is it possible to pull the value of a field
> back
> out of the SQLBulkInsert object?  Do I have to execute a sql statement to
> "get" the value of the PKID of the last record before the import and the
> last record after the import?
>
>



More information about the dba-SQLServer mailing list