or download this
declare @P1 int
set @P1=8
exec sp_prepexec @P1 output, N'@P1 bigint,@P2 nvarchar(3),@P3 bigint,@
+P4 nvarchar(6)', N'INSERT INTO t_PostParams (po_id, pp_name, pp_id, p
+p_value)
VALUES (@P1, @P2, @P3, @P4)
', 2, N'Log', 3, N'artem2'
select @P1