Web method calls sproc that returns output parameter

Discussion in 'ASP .Net Web Services' started by mscertified, Aug 22, 2008.

  1. mscertified

    mscertified Guest

    Web method calls sproc that returns output parameter

    how do I code this?
    I am a complete beginner to .NET and web services. Here is code:

    [WebMethod, Description("Run Monthly Payment Summary Report")]
    public DataSet MonthlyPaymentSummary(string AsOfDate, out string
    ErrorId)
    {
    try
    {
    Database db = DatabaseFactory.CreateDatabase("SqlServices");
    System.Data.Common.DbCommand dbCommand =
    db.GetStoredProcCommand("MonthlyPaymentSummary", AsOfDate);

    DataSet ds = db.ExecuteDataSet(dbCommand);
    return ds;
    }
    catch (Exception e)
    {
    ExceptionPolicy.HandleException(e, "Log and Alert Policy");
    return null;
    }
    }

    I get error "our parm 'errorid' must be assigned to before control leaves
    current method'.
    I have no clue what this means. If errorid is zero it is a good condition
    otherwise it is an error condition.
    Another question is can I use anything other than 'string', I tried
    'datetime' and it was rejected, my AsOfDate parameter is a datetime value.

    Thanks for any help.
     
    mscertified, Aug 22, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UA==?=
    Replies:
    1
    Views:
    2,214
    Michelle Hlaing
    Nov 30, 2004
  2. Chad Micheal Lawson via .NET 247

    SQL 2k - ASP.NET - SPROC - "Input string was not in a correct format."

    Chad Micheal Lawson via .NET 247, Sep 24, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    606
    Greg Burns
    Sep 24, 2004
  3. =?Utf-8?B?c2tpcmtieQ==?=

    Problem using COMPUTE with SPROC on ASP Application

    =?Utf-8?B?c2tpcmtieQ==?=, Nov 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    296
    Scott Allen
    Nov 1, 2004
  4. andy6
    Replies:
    2
    Views:
    763
    andy6 via DotNetMonster.com
    Jun 9, 2006
  5. mscertified

    How get an sproc OUTPUT parameter?

    mscertified, Sep 4, 2008, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    190
    Mark Stevens
    Sep 4, 2008
Loading...

Share This Page