• Excellent, I think I am getting the sql profiler speak...

    just for clarity...

    Event Class = RPC: Completed

    TextData = declare @p1 int

    set @p1=26

    exec sp_prepexec @p1 output,NULL,N'SELECT in_update FROM ngn_ids WHERE id_name = ''Histories_MedSurg'' AND id_value = ''557D78F4-F830-47C6-BE87-23F567F2FC3C'''

    select @p1

    You wrote: Select @p1 is just returning the value to the application so the application can re-use it with another sp_execute or with sp_unprepare

    So since this was a select statement, @p1 is just a handle to the sql select statement, not the value of result set of in_update values? is the result set of values just sent automatically back to the calling application?

    -------------------------------------------------------------------

    Event Class = RPC: Completed

    TextData = declare @p1 int

    set @p1=28

    declare @p3 int

    set @p3=0

    declare @p4 varchar(max)

    set @p4='ng_update_person: (Success), Person "Deano TestRochester" {557D78F4-F830-47C6-BE87-23F567F2FC3C} Added.'

    exec sp_prepexecrpc @p1 output,N'ng_update_person',@po_result_code=@p3 output,@po_result_message=@p4 output,@pi_person_id='557D78F4-F830-47C6-BE87-23F567F2FC3C',@pi_user_id=154

    select @p1, @p3, @p4

    You wrote:@p1 is the handle for the sql statement, @p3 and @p4 are output parameters for the call and are returned so the application can use them if needed.

    So @p1 is the handle again, not the returned value of zero or rows updated, right?

    And is @p3 zero

    and is @p4 'ng_update_person: (Success), Person "Deano TestRochester" {557D78F4-F830-47C6-BE87-23F567F2FC3C} Added.'

    which are both sent back to the calling application?