• Lowell (8/14/2012)


    if a transaction rolls back or fails, the identity() columns still increment.

    it sounds like an error occurred inserting the data that was not handled/reported by the .net application.

    i've seen things form an app, like sticking zero in a foreign key column, or leaving values null for NOT NULL columns, for example.

    those things return an error from SQL, but the app might jsut be assuming that the data was updated/inserted, without displaying any errors returned.

    I used this to see if any deletions happened on that table , and it gave me 1 [Transaction ID]

    So its like the record was inserted and then deleted?? isn't it?

    DECLARE @TableName sysname

    SET @TableName = 'dbo.Table A'

    SELECT

    [Transaction ID]

    FROM

    fn_dblog(NULL, NULL)

    WHERE

    AllocUnitName LIKE @TableName + '%'

    AND

    Operation = 'LOP_DELETE_ROWS'