>Yes, after every SQL statement I check @@Error. At the end of the SP the error is inserted in a table. However I don't get any errors in the table. The strangest thing is that it doesn't fail all the time (with the same data). I would suspect that it would either fail all the time or not at all.
>
>Martin
>
>>Do you have error handling in your SP?
Than there only two possibilities left, I think
1. The flaw in your SP logic
2. The bug in SQL Server.
To exclude the first one ask somebody who knows T-SQL but not familiar with what this SP does to look into it code. To address second one make sure that you have the latest SP installed on SQL server.
--sb--