Web method calls sproc that returns output parameter

M

mscertified

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.
 

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

Members online

Forum statistics

Threads
473,765
Messages
2,569,568
Members
45,042
Latest member
icassiem

Latest Threads

Top