I have an execute statement for a stored procedure inside of a stored procedure (template below) , the execute is set to run after an inset into a table. The StoredProc2 is dependent on the inserted record. I run the StoredProc1 in a loop from my vb.net code.
For some reason it seems like occasionally the StoredProc2 that depends on the insert in StoredProc1
executes before the insert completes. Is there a way I can force my StoredProc2 run only after the insert completes.
INSERT INTO MyTbl &
EXECUTE StoredProc2 &