Thursday 5 January 2012

Procedure with output parameter

With the help of Enterprise library:
Solution:

 DbCommand cmdDel = _db.GetStoredProcCommand("USP_YOURPROCEDURE");
                _db.AddOutParameter(cmdDel, "@STATUS", DbType.String, int.MaxValue);
                _db.AddInParameter(cmdDel, "@VID", DbType.Int32, HFVID.Value);
                _db.ExecuteDataSet(cmdDel);
               
                lblStatus.Text = cmdDel.Parameters["@STATUS"].Value.ToString();

A name was started with an invalid character. Error processing resource 'http://localhost/WCF...'


<>The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

A name was started with an invalid character. Error processing resource 'http://localhost/WCFIISService/Service.svc'. Line...
<%@ ServiceHost Service="WCFDefault.Service1" %>

Solution:

IN IIS>Handler Mappings>Add Managed Handlers

Request-path
*.svc

Type:
System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Name
svc-integrated