Hi guys
I'm having a bit of trouble getting these changes to work. Wonder if someone
can explain what I'm missing.
I exchanged the AccessDataSource objects for SQLDataSource objects, which
look like..
<asp:SqlDataSource ID="sdsTopStories" runat="server" ConnectionString="<%$
ConnectionStrings:sdsBeggars %>" ProviderName="<%$
ConnectionStrings:sdsBeggars.ProviderName %>"
SelectCommand="...">
</asp:SqlDataSource>
and changed the DataSourceID of my Repeater to "sdsTopStories".
VS added a connection strings element to web config which looks like...
<add name="sdsBeggars"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=|DataDirectory|\Beggars.mdb;Persist Security Info=True;Jet
OLEDB
atabase Password="my password"" providerName="System.Data.OleDb" />
Which, when I test the connection, seems to work. But I now get the
following .net error when I debug my website... (im not passing any paraments
to my sql - it doesnt need any)
=====================================================
Server Error in /Beggars Application
No value given for one or more required parameters.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: No value given for one
or more required parameters.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[OleDbException (0x80040e10): No value given for one or more required
parameters.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +267
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
+192
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
Object& executeResult) +48
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method) +106
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +111
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) +141
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.WebControls.Repeater.GetData() +50
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +232
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
System.Web.UI.WebControls.Repeater.DataBind() +72
System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
===================================================
________________________________________
musosdev said:
Hi guys
Thanks for the info - much appreciated. I'll give it ago!
Ta
Dan