>cSqlInsert = cSqlInsert + "; select SCOPE_IDENTITY() AS NEW_PK " >nResult = SQLEXEC(hCon, cSqlInsert,"cur_identity") >>
>*-- Commented. cSqlInsert = cSqlInsert + "; select SCOPE_IDENTITY() AS NEW_PK " >nResult = SQLEXEC(hCon, cSqlInsert ) && <-- removed "cur_identity" >Did you try tracing with SQL Server Profiler? I see no reason for that behavior unless you had the SET ROWCOUNT somewhere in your connection that limits number of rows per operation.