Check this out:
http://support.microsoft.com/kb/320141/EN-US/
Or consider SCOPE_IDENTITY() look it up in Books Online that comes with SQL Server, you can use it in a stored procedure to return the last Identity insert value from an insert statement.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68