需要参数 '@adminAccount',但未提供该参数。
堂堂D 2012-05-08 09:04:25 “/”应用程序中的服务器错误。
参数化查询 '(@adminAccount nvarchar(4000),@adminPwd nvarchar(4000),@adminRol' 需要参数 '@adminAccount',但未提供该参数。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 参数化查询 '(@adminAccount nvarchar(4000),@adminPwd nvarchar(4000),@adminRol' 需要参数 '@adminAccount',但未提供该参数。
源错误:
行 110: SqlCommand cmd = new SqlCommand(sql, connection, transaction);
行 111: cmd.Parameters.AddRange(values);
行 112: int result = Convert.ToInt32(cmd.ExecuteScalar());
行 113: return result;
行 114: }
源文件: D:\我的文档\Desktop\DuoCai\DuoCaiDLL\DuoCaiDAL\DBHelper.cs 行: 112
堆栈跟踪:
[SqlException (0x80131904): 参数化查询 '(@adminAccount nvarchar(4000),@adminPwd nvarchar(4000),@adminRol' 需要参数 '@adminAccount',但未提供该参数。]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +946986
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +821638
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteScalar() +137
DuoCaiDLL.DuoCaiDAL.DBHelper.GetScalar(String sql, SqlParameter[] values) in D:\我的文档\Desktop\DuoCai\DuoCaiDLL\DuoCaiDAL\DBHelper.cs:112
DuoCaiDLL.DuoCaiDAL.AdminInfoService.AdminAdd(AdminInfo admin) in D:\我的文档\Desktop\DuoCai\DuoCaiDLL\DuoCaiDAL\AdminInfoService.cs:35
DuoCaiDLL.DuoCaiBLL.AdminInfoManager.AdminAdd(AdminInfo admin) in D:\我的文档\Desktop\DuoCai\DuoCaiDLL\DuoCaiBLL\AdminInfoManager.cs:33
DuoCaiApple.DuoCaiBackManageSystem.WebBack.Admin_Add.btnAdd_Click(Object sender, EventArgs e) in D:\我的文档\Desktop\DuoCai\DuoCaiApple\DuoCaiBackManageSystem\WebBack\Admin_Add.aspx.cs:44
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746