Web method calls sproc that returns output parameter



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
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.


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question