Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Czech Republic

    Unanswered: How to enforce number of calling - called params be the same???


    One team

    create proc sp_get_dates( @date1 datetime, @date2, datetime )

    ... BODY of stored proc

    return 0

    Another team is creating stored proc that call sp_get_dates
    But they expect 3 params!!!

    exec sp_get_dates @ld_date1, @ld_date2, @ld_date3
    if ( @@error != 0 ) return @error


    Problem: During completing and funkcionally test phase we don t get any error info! Code proceed and there is no message that number of calling-called don´t match!

    What to do to enforce error if params number dont match?

  2. #2
    Join Date
    Sep 2003
    Are they creating the procedure with own id? Looks like there needs to be some kind of a development procedure you need to follow for your team.

    However, you could query sysprocedures for duplicate names OR syscolumns for no. of parameters as an audit procedure.

    sysprocedures contains one row for each procedure created.

    syscolumns contains one row for every column in every table and view, and a row for each parameter in a procedure.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts