Share via


OleDbException (0x80040e10): No value given for one or more required parameters.

Question

Monday, July 12, 2010 2:19 AM

I am trying to access my access 2007 database and I am having troubles getting it to work. Here is the error I am getting so far:

[OleDbException (0x80040e10): No value given for one or more required parameters.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1070856
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +194
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +167
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +116
   System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +144
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +319
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1618
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   System.Web.UI.WebControls.FormView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
   System.Web.UI.WebControls.FormView.EnsureDataBound() +183
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
   System.Web.UI.Control.EnsureChildControls() +102
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

Here is my SqlDataSource control properties (which seem to have caused this error):

<asp:sqlDataSource ID="ImageSqlDataSource" ProviderName="<%$ ConnectionStrings:Hultin.ProviderName %>"
          selectCommand="SELECT logo_id, filePath, author, userComments FROM Logos"
          connectionstring="<%$ ConnectionStrings:Hultin %>"
          RunAt="server">
        </asp:sqlDataSource>

Thanks for the help

All replies (1)

Tuesday, July 13, 2010 10:48 AM âś…Answered

Most likely you mistyped a field or tablename, which will not be recognized by Access and then it is handled as a parameter, which obviously you didn't specify. So please check the syntax?