Hello @ all,
I just noticed, that the INSERT Statements in the Database all return the @@identity parameter, that is (supposed) to contain the PK of the just added record set. This is true as far as it goes, as the @@identity parameter contains the PK of the latest insert statement, which can also be the PK of a record-set in another table. A safer (and recommended way) is to use SCOPE_IDENTITY(), which will definitely contain the desired PK.
Cheers,
hoppi