I can't figure out why this multi-table insert (stored procedure) using scope_identity() is not working. This is the gist of it (forgive the unimaginative naming here, please):

TableB's RowID column is obviously an int, not set as identity auto-increment or anything like that.
If I run it in management studio, it says 1 row was affected, but it does not do the inserts.
If I run it from code I get an error saying that I can't insert a NULL value in TableB, RowID, which is correct, it has a not null constraint. But it should be getting the scope_identity() from the first table.
I've tried it in and out of transactions and with various parameter initializations... It's killing me. Thanks in advance for any assistance.