至少一个参数没有被指定值,求解
至少一个参数没有被指定值。 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.OleDb.OleDbException: 至少一个参数没有被指定值。
源错误:
行 24: OleDbDataAdapter dr = new OleDbDataAdapter("SELECT * FROM tblfilminformation where filmname like'%" + TextBox1.Text + "%'", conn);
行 25: DataTable DT = new DataTable();
行 26: dr.Fill(DT);
行 27: Repeater1.DataSource = DT;
行 28: Repeater1.DataBind();
源文件: f:\06 李彩凤\Ex1_1\MyFirstWeb\Chaxun.aspx.cs 行: 26
堆栈跟踪:
[OleDbException (0x80040e10): 至少一个参数没有被指定值。]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +44
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +155
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +190
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +162
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +97
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
System.(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +128
System.(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +160
System.(DataTable dataTable) +113
chaxun.Button1_Click(Object sender, EventArgs e) in f:\06 李彩凤\Ex1_1\MyFirstWeb\Chaxun.aspx.cs:26
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +78
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +100
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2863