Avatar of Monalot

asked on 

MS Access in ASP appl. - updates dont work


I am building an app in C# and ASP.NET.  It uses an MS Access DB.  I built a page with a detailsview control bound the a table in the DB to insert rows.  I test the app locally and everything works.  I copied the web site to the internet.  When I try to insert records I get:

Operation must use an updateable query.

I went into the AccessDataSource properties and changed the Inert query property parameters to INPUTOUTPUT from INPUT.  I then got:

invalid parameter accessor: 1 BADBINDINFO

I am missing something, probably basic.  

Any help would be greatly appreciated.

<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Product.mdb"
            DeleteCommand="DELETE FROM [ONAIntranet_Links] WHERE [Category] = ? AND [Title] = ?"
            InsertCommand="INSERT INTO ONAIntranet_Links(Category, Title, HyperLink) VALUES (?, ?, ?)"
            SelectCommand="SELECT [Category], [Title], [HyperLink] FROM [ONAIntranet_Links]"
            UpdateCommand="UPDATE [ONAIntranet_Links] SET [HyperLink] = ? WHERE [Category] = ? AND [Title] = ?">
                <asp:Parameter Name="Category" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter Name="HyperLink" Type="String" />
                <asp:Parameter Name="Category" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter Name="Category" Type="String" Size="20" />
                <asp:Parameter Name="Title" Type="String" Size="80" />
                <asp:Parameter Name="HyperLink" Type="String" Size="255" />
       <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="Category,Title"
            DataSourceID="AccessDataSource1" Height="50px" Width="496px" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" DefaultMode="Insert">
                <asp:BoundField DataField="Category" HeaderText="Category" SortExpression="Category" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="HyperLink" HeaderText="HyperLink" SortExpression="HyperLink" />
                <asp:CommandField ShowInsertButton="True" />
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />

Open in new window

Web ApplicationsMicrosoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon