Forum Replies Created

Viewing 2 posts - 1,396 through 1,398 (of 1,398 total)

  • Reply To: Store Procedure...

    Yes exactly.  Something like:

    drop proc if exists wm.api_comment_post;

    go

    create proc wm.api_comment_post

    @securitystamp uniqueidentifier,

    @cw_id bigint,

    @comment nvarchar(1024),

    @test_id bigint output,

    @response nvarchar(max) output

    as

    set nocount on;

    set xact_abort on;

    begin transaction

    begin try

    declare

    @awc_id bigint;

    insert comments(u_id, w_id, cw_id, comment, created_dt, edited_dt)

    select

    wm.func_user_id(@securitystamp),

    cw.w_id,

    cw.cw_id,

    @comment,

    sysutcdatetime(),

    sysutcdatetime()

    from

    wm.class_workouts...

  • Reply To: Store Procedure...

    Reasons to use output parameters in stored procedures:

    1. To return db keys generated within the procedure
    2. To return data (version id's, timestamp's, etc) which changed/updated as a result of actions...

Viewing 2 posts - 1,396 through 1,398 (of 1,398 total)