本文介绍了过程或函数'BindSectionByTeacher'需要未提供的参数'@SchoolId'.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个查询,我试图在一个下拉列表中绑定类,但它显示以下错误...
过程或函数"BindSectionByTeacher"需要参数"@SchoolId",但未提供."
我了解了错误,但我想我已经提供了SchoolId....以下是我的查询....
I have a query and i am trying to bind class inside a dropdown but it showing the following error...
"Procedure or function ''BindSectionByTeacher'' expects parameter ''@SchoolId'', which was not supplied."
I Understand the error but i think i have supplied the SchoolId ....Below is my query....
ALTER PROCEDURE [dbo].[BindClassByTeacher]
@TeacherId int,
@SchoolId int
AS
BEGIN
select T.AllowtedClass,T.ClassId from TeacherAllowtedClass T
inner join SchoolMaster S
on S.School_ID=T.School_ID
where T.School_ID=@SchoolId and T.Teacher_ID=@TeacherId
Order by T.ClassId
END
我的后端编码是...
and my backend coding is...
DbConnection bind = new DbConnection();
bind.BindDropdownlist_para(ddlclass, "[BindClassByTeacher]", "AllowtedClass", "ClassId", "@SchoolId", Session["School"].ToString(),
"@TeacherId", Session["teacherid"].ToString());
Allowted Class ClassId
11th 2
Nursery 4
10th 8
请尝试帮助我...谢谢....
Please try to help me...thanx....
推荐答案
这篇关于过程或函数'BindSectionByTeacher'需要未提供的参数'@SchoolId'.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!