Abhimanyu Singh

Abhimanyu Singh

  • NA
  • 116
  • 48.9k

Procedure '@Service_BusinessName', which was not supplied.

Mar 4 2014 5:14 AM
 Hello all
 Plz Help I am Getting following errors:

Procedure or function 'CraveAfrik_LeafServiceAllOnBusinessName_Select' expects parameter '@Service_BusinessName', which was not supplied. 

Procedure:
 
Alter Proc CraveAfrik_LeafServiceAllOnBusinessName_Select
(
@Service_BusinessName Nvarchar(100)
)
As
Select Buss.Service_BusinessId,
Buss.Service_BusinessName ,
Buss.Service_Business_Buildilng ,
Buss.Service_Business_Street ,
Buss.Service_Business_LandMark ,
Buss.Service_Business_Area ,
Buss.Service_Business_City ,
Buss.Service_Business_PinCode ,
Buss.Service_Business_State ,
buss.IsActive ,
Buss.CreationDate ,
dbo.CraveAfrik_Service_NamewithOArent_Select (Buss.Service_ProductId) AS ServiceProductName,
Cont.Service_ContactPerson_Title ,
Cont.Service_ContactPerson_FirstName ,
Cont.Service_ContactPerson_MiddleName ,
Cont.Service_ContactPerson_LastName ,
Cont.Service_ContactPerson_Business_LandLineNo ,
Cont.Service_ContactPerson_Business_MobileNo ,
Cont.Service_ContactPerson_Business_FaxNo ,
Cont.Service_ContactPerson_Business_FaxNo2 ,
Cont.Service_ContactPerson_Business_TollFreeNo ,
Cont.Service_ContactPerson_Business_TollFreeNo2 ,
Cont.Service_ContactPerson_Business_EmailId ,
Cont.Service_ContactPerson_Business_Website
From tblService_ServiceCategoryLeaf_BusinessLocationDetails_CraveAfrik
as Buss inner join tblService_ServiceCategoryLeaf_ContactDetails_CraveAfrik as Cont
on Buss.Service_BusinessId =Cont.Service_BusinessId
Where Buss.Service_BusinessName = @Service_BusinessName AND Buss.IsDeleted=0
 
CS Code :- 
 
protected void GetAllServiceOnBusiness()
{
List<DbParameter> _Param = new List<DbParameter>();
_Param.Add(Provider.DbHelper.GetParameter("@Service_BusinessName", SqlDbType.NVarChar));
DataTable dt = Provider.DbHelper.GetDataTable("CraveAfrik_LeafServiceAllOnBusinessName_Select", CommandType.StoredProcedure);
//DataView dv = new DataView(dt);
//dv.Sort = Convert.ToString(ViewState["sortExp"]).Equals("") ? "CreationDate" : ViewState["sortExp"].ToString();
if (dt.Rows.Count > 0)
{
grdService.DataSource = dt;
grdService.DataBind();
ddlPageSize.Enabled = grdService.Rows.Count > 30;
}
else
{
MsgBox1.AddMessage("No record found.", _Controls.MsgBox.enmMessageType.Attention);
}
}